From c7958d1ebfc6e7e5e24d7daf4bb1e589f3671535 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 7 Nov 2023 16:23:57 +0100 Subject: [PATCH] HOTFIX * fixes bug on saving eco account with missing deductable surface value --- compensation/forms/eco_account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compensation/forms/eco_account.py b/compensation/forms/eco_account.py index 9e74e83..0352383 100644 --- a/compensation/forms/eco_account.py +++ b/compensation/forms/eco_account.py @@ -175,7 +175,7 @@ class EditEcoAccountForm(NewEcoAccountForm): def is_valid(self): valid = super().is_valid() - deductable_surface = self.cleaned_data.get("surface") + deductable_surface = self.cleaned_data.get("surface") or 0.0 deduction_surface_sum = self.instance.get_deductions_surface() if deductable_surface < deduction_surface_sum: self.add_error(