From 9bd2b42ba8a34d4aa95b9635761e634e5f16b280 Mon Sep 17 00:00:00 2001 From: mariusrklein <47218379+mariusrklein@users.noreply.github.com> Date: Sun, 6 Apr 2025 14:26:01 +0200 Subject: [PATCH] fix: abstraction of bill calculation --- jdav_web/finance/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdav_web/finance/models.py b/jdav_web/finance/models.py index 83905d7..86d369a 100644 --- a/jdav_web/finance/models.py +++ b/jdav_web/finance/models.py @@ -282,7 +282,7 @@ class Statement(CommonModel): @property def total_bills(self): - return sum([bill.amount for bill in self.bill_set.all() if bill.costs_covered]) + return sum([bill.amount for bill in self.bills_covered]) @property def bills_covered(self):