This commit is contained in:
Ross
2021-12-04 18:02:11 +00:00
parent 27144904dd
commit 22e23622d8
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -47,6 +47,14 @@ class SeriesFindingForm(ModelForm):
# The widget for a ModelMultipleChoiceField expects
# a list of primary key for the selected data.
initial["series"] = kwargs.pop("series_id")
#elif kwargs.get("instance"):
# # We get the 'initial' keyword argument or initialize it
# # as a dict if it didn't exist.
# initial = kwargs.setdefault("initial", {})
# # The widget for a ModelMultipleChoiceField expects
# # a list of primary key for the selected data.
# #initial["structures"] = [t.pk for t in kwargs["structures"].case.all()]
# #initial["structures"] = [t.pk for t in kwargs["structures"].case.all()]
super(SeriesFindingForm, self).__init__(*args, **kwargs)