From 59880e7d25917beab163155cb06ba0f0626997f8 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 5 Feb 2021 11:33:48 +0000 Subject: [PATCH] . --- longs/forms.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/longs/forms.py b/longs/forms.py index 6073951d..b90ca650 100755 --- a/longs/forms.py +++ b/longs/forms.py @@ -51,7 +51,6 @@ class NoteForm(ModelForm): fields = ["note"] - class LongCreationDefaultForm(ModelForm): class Meta: model = LongCreationDefault @@ -59,6 +58,12 @@ class LongCreationDefaultForm(ModelForm): exclude = ["author"] class LongSeriesForm(ModelForm): + def __init__(self, *args, **kwargs): + self.fields["examination"] = ModelMultipleChoiceField( + queryset=Examination.objects.all(), + widget=FilteredSelectMultiple(verbose_name="Examination", is_stacked=False), + ) + class Meta: model = LongSeries exclude = []