This commit is contained in:
Ross
2021-11-25 18:18:09 +00:00
parent 4f1fc594e2
commit 072a616326
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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(
+1 -1
View File
@@ -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(