From 95f33085573d1d8322d72b3851f1438710972e94 Mon Sep 17 00:00:00 2001 From: Rasmus Selsmark Date: Mon, 16 Sep 2024 21:15:15 +0200 Subject: [PATCH] Code formatting --- members/models/activity.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/members/models/activity.py b/members/models/activity.py index 095536b7..3549f42c 100644 --- a/members/models/activity.py +++ b/members/models/activity.py @@ -148,11 +148,21 @@ def clean(self): if self.signup_closing is None: errors["signup_closing"] = "Der skal angives en dato for tilmeldingsfrist" - if (self.start_date is not None) and (self.end_date is not None) and (self.start_date > self.end_date): + if ( + (self.start_date is not None) + and (self.end_date is not None) + and (self.start_date > self.end_date) + ): errors["signup_closing"] = "Startdato skal være før aktivitetens slutdato" - if (self.signup_closing is not None) and (self.end_date is not None) and (self.signup_closing > self.end_date): - errors["signup_closing"] = "Tilmeldingsfristen skal være før aktiviteten slutter" + if ( + (self.signup_closing is not None) + and (self.end_date is not None) + and (self.signup_closing > self.end_date) + ): + errors["signup_closing"] = ( + "Tilmeldingsfristen skal være før aktiviteten slutter" + ) if errors: raise ValidationError(errors)