Skip to content
Snippets Groups Projects
Commit d1ff5e0d authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '218-keyerror-carry_over_week-if-preference-is-disabled' into 'master'

Resolve "KeyError: 'carry_over_week' if preference is disabled"

Closes #218

See merge request !286
parents 14c6c8f0 672baf26
No related branches found
No related tags found
1 merge request!286Resolve "KeyError: 'carry_over_week' if preference is disabled"
Pipeline #74466 passed
...@@ -24,6 +24,7 @@ Fixed ...@@ -24,6 +24,7 @@ Fixed
* The week overview page was not refreshed when a new week was selected in the dropdown. * The week overview page was not refreshed when a new week was selected in the dropdown.
* Make generation of full register printout faster. * 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 `2.0.1`_ - 2022-02-12
--------------------- ---------------------
......
...@@ -58,7 +58,8 @@ class LessonDocumentationForm(forms.ModelForm): ...@@ -58,7 +58,8 @@ class LessonDocumentationForm(forms.ModelForm):
def save(self, **kwargs): def save(self, **kwargs):
lesson_documentation = super(LessonDocumentationForm, self).save(commit=True) lesson_documentation = super(LessonDocumentationForm, self).save(commit=True)
if ( if (
self.cleaned_data["carry_over_week"] get_site_preferences()["alsijil__allow_carry_over_same_week"]
and self.cleaned_data["carry_over_week"]
and ( and (
lesson_documentation.topic lesson_documentation.topic
or lesson_documentation.homework or lesson_documentation.homework
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment