From 4dbf834586cd2d09c0bbcfe5fcb2148403b2df73 Mon Sep 17 00:00:00 2001 From: Tom Teichler <tom.teichler@teckids.org> Date: Sun, 1 Sep 2019 20:22:39 +0200 Subject: [PATCH] Add missing querysets. --- biscuit/apps/chronos/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/biscuit/apps/chronos/forms.py b/biscuit/apps/chronos/forms.py index f9f304ed..504e6357 100644 --- a/biscuit/apps/chronos/forms.py +++ b/biscuit/apps/chronos/forms.py @@ -25,5 +25,7 @@ class LessonSubstitutionForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self.fields['lesson_period'].queryset = LessonPeriod.objects.all() + self.fields['subject'].queryset = Subject.objects.all() self.fields['teachers'].queryset = Person.objects.all() - self.fields['room'].queryset = Person.objects.all() + self.fields['room'].queryset = Room.objects.all() -- GitLab