From 072a61632629ea80f032abcf2048cb1818a10c82 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 25 Nov 2021 18:18:09 +0000 Subject: [PATCH] . --- atlas/forms.py | 2 +- longs/forms.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atlas/forms.py b/atlas/forms.py index d996c771..d1bed07f 100755 --- a/atlas/forms.py +++ b/atlas/forms.py @@ -51,7 +51,7 @@ class SeriesForm(ModelForm): initial = kwargs.setdefault("initial", {}) # The widget for a ModelMultipleChoiceField expects # a list of primary key for the selected data. - initial["long"] = [t.pk for t in kwargs["instance"].exams.all()] + initial["case"] = [t.pk for t in kwargs["instance"].case.all()] super(SeriesForm, self).__init__(*args, **kwargs) # self.fields["examination"] = ModelChoiceField( diff --git a/longs/forms.py b/longs/forms.py index 549c8f28..97a953bc 100755 --- a/longs/forms.py +++ b/longs/forms.py @@ -90,7 +90,7 @@ class LongSeriesForm(ModelForm): initial = kwargs.setdefault("initial", {}) # The widget for a ModelMultipleChoiceField expects # a list of primary key for the selected data. - initial["long"] = [t.pk for t in kwargs["instance"].exams.all()] + initial["long"] = [t.pk for t in kwargs["instance"].long.all()] super(LongSeriesForm, self).__init__(*args, **kwargs) # self.fields["examination"] = ModelChoiceField(