From 28c9da81681fa190cd37a9282ee8904ed559fbf0 Mon Sep 17 00:00:00 2001 From: Christian Merten Date: Sun, 1 Dec 2024 21:31:39 +0100 Subject: [PATCH] members: fix has statement check --- jdav_web/members/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdav_web/members/models.py b/jdav_web/members/models.py index f2b823a..4d1c70b 100644 --- a/jdav_web/members/models.py +++ b/jdav_web/members/models.py @@ -1177,7 +1177,7 @@ class Freizeit(CommonModel): # Ort, Datum 'DatumOrt 2': 'Heidelberg, ' + datetime.now().strftime('%d.%m.%Y') } - if self.statement: + if hasattr(self, 'statement'): possible_contributions = self.maximal_ljp_contributions total_contributions = min(self.statement.total_theoretic, possible_contributions) self_participation = max(cvt_to_decimal(0), self.statement.total_theoretic - possible_contributions)