From 53338a43f4096c46a6090c88f881f3fb6b16b34a Mon Sep 17 00:00:00 2001 From: Kevin Alberts Date: Wed, 30 Sep 2026 10:15:00 +0200 Subject: [PATCH 1/3] personal_tab: Fix AttributeError when validating declaration --- amelie/personal_tab/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amelie/personal_tab/forms.py b/amelie/personal_tab/forms.py index 6cbf0172..d3015302 100644 --- a/amelie/personal_tab/forms.py +++ b/amelie/personal_tab/forms.py @@ -556,7 +556,7 @@ def clean(self): _l('The amount must be a positive number.') ) - elif description.strip() == '': + elif not description or description.strip() == '': raise forms.ValidationError( _l('Please provide a description for your declaration.') ) From c502b2a0e778778884613c8f2fbc95d1a53fca8f Mon Sep 17 00:00:00 2001 From: Kevin Alberts Date: Wed, 30 Sep 2026 10:18:18 +0200 Subject: [PATCH 2/3] personal_tab: Fix TypeError 'NoneType' object is not iterable if person has no transactions but views their transaction overview --- amelie/personal_tab/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amelie/personal_tab/views.py b/amelie/personal_tab/views.py index 4d8ba22c..6578df8d 100644 --- a/amelie/personal_tab/views.py +++ b/amelie/personal_tab/views.py @@ -180,7 +180,7 @@ def generate_overview(request, person, date_from=None, date_to=None): overview_type = None total = False totals = None - all_payment_totals = None + all_payment_totals = [] kcal_totals = None all_transactions = None payment_transactions = None From 9526f3fabf9a166ef519361ef0c4b69e0a0e22bb Mon Sep 17 00:00:00 2001 From: Kevin Alberts Date: Wed, 30 Sep 2026 15:13:08 +0200 Subject: [PATCH 3/3] activities: Fix issue where personal tab transactions are not created for the final person to enroll for a limited places activity --- amelie/activities/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/amelie/activities/views.py b/amelie/activities/views.py index 0e0b1972..deabb6f1 100644 --- a/amelie/activities/views.py +++ b/amelie/activities/views.py @@ -532,12 +532,15 @@ def form_valid(self, form): # Check if the enrollment was indirect and the option to skip the waiting list for this enrollment was selected. force_skip_waiting_list = self.indirect and form.cleaned_data.get('indirect', {}).get('waiting_list', None) == "skip" + # Save if the activity is full or not, for the check whether to create transactions or not later on + activity_is_full = self.activity.enrollment_full + # Enroll the person participation = Participation( person=self.person, event=self.activity, added_by=self.request.person, - waiting_list=(self.activity.enrollment_full and not force_skip_waiting_list) + waiting_list=(activity_is_full and not force_skip_waiting_list) ) if self.indirect: @@ -570,7 +573,7 @@ def form_valid(self, form): participation.delete() return render(self.request, "activity_enrollment_mandate.html", {'activity': self.activity}) - if price and (force_skip_waiting_list or not self.activity.enrollment_full): + if price and (force_skip_waiting_list or not activity_is_full): transactions.add_participation(participation=participation, added_by=self.request.person) # Maybe send a notification e-mail to the person and set a status message in the request.