.
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ class SeriesForm(ModelForm):
|
|||||||
initial = kwargs.setdefault("initial", {})
|
initial = kwargs.setdefault("initial", {})
|
||||||
# The widget for a ModelMultipleChoiceField expects
|
# The widget for a ModelMultipleChoiceField expects
|
||||||
# a list of primary key for the selected data.
|
# 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)
|
super(SeriesForm, self).__init__(*args, **kwargs)
|
||||||
# self.fields["examination"] = ModelChoiceField(
|
# self.fields["examination"] = ModelChoiceField(
|
||||||
|
|||||||
+1
-1
@@ -90,7 +90,7 @@ class LongSeriesForm(ModelForm):
|
|||||||
initial = kwargs.setdefault("initial", {})
|
initial = kwargs.setdefault("initial", {})
|
||||||
# The widget for a ModelMultipleChoiceField expects
|
# The widget for a ModelMultipleChoiceField expects
|
||||||
# a list of primary key for the selected data.
|
# 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)
|
super(LongSeriesForm, self).__init__(*args, **kwargs)
|
||||||
# self.fields["examination"] = ModelChoiceField(
|
# self.fields["examination"] = ModelChoiceField(
|
||||||
|
|||||||
Reference in New Issue
Block a user