diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7151f1d9b7d918f6cf56be6406f2924137694fec..e09961228d3d87a8ab7dc9eb031005eebd410514 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,7 @@ Fixed * The week overview page was not refreshed when a new week was selected in the dropdown. * Make generation of full register printout faster. +* Updating a lesson documentation caused an error when the preference for carrying over lesson documentations to the whole week was deactivated. `2.0.1`_ - 2022-02-12 --------------------- diff --git a/aleksis/apps/alsijil/forms.py b/aleksis/apps/alsijil/forms.py index 6f4e65b2022192c3cf5c0a7c4b44cc3e1731919e..e8ade98e2d2ea50a954e646c1e8688089a7a3661 100644 --- a/aleksis/apps/alsijil/forms.py +++ b/aleksis/apps/alsijil/forms.py @@ -58,7 +58,8 @@ class LessonDocumentationForm(forms.ModelForm): def save(self, **kwargs): lesson_documentation = super(LessonDocumentationForm, self).save(commit=True) if ( - self.cleaned_data["carry_over_week"] + get_site_preferences()["alsijil__allow_carry_over_same_week"] + and self.cleaned_data["carry_over_week"] and ( lesson_documentation.topic or lesson_documentation.homework