From 12fa99eb5066d54bbb35db89a174b338e91fb7bf Mon Sep 17 00:00:00 2001 From: imperosol Date: Wed, 30 Sep 2026 17:01:29 +0200 Subject: [PATCH] add `show_my_timetable` to VisibilityForm --- core/views/forms.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/views/forms.py b/core/views/forms.py index eb9dce95..cc235a2e 100644 --- a/core/views/forms.py +++ b/core/views/forms.py @@ -339,7 +339,7 @@ class UserVisibilityForm(forms.ModelForm): ["show_my_stats", "show_my_timetable"], widgets={ "show_my_stats": forms.CheckboxInput(attrs={"class": "switch"}), - "show_my_timetable": forms.CheckboxInput(attrs={"class": "switch"}) + "show_my_timetable": forms.CheckboxInput(attrs={"class": "switch"}), }, ) show_my_stats = __preferences_fields["show_my_stats"] @@ -358,7 +358,9 @@ class UserVisibilityForm(forms.ModelForm): instance = super().save(commit=commit) if commit: instance.preferences.show_my_stats = self.cleaned_data["show_my_stats"] - instance.preferences.show_my_timetable = self.cleaned_data["show_my_timetable"] + instance.preferences.show_my_timetable = self.cleaned_data[ + "show_my_timetable" + ] instance.preferences.save() return instance