This commit is contained in:
Ross
2021-05-05 19:03:31 +01:00
parent 586956c045
commit 0bb042f9ac
+1
View File
@@ -47,6 +47,7 @@ class QuestionNoteForm(ModelForm):
get_object_or_404(question, pk=pk)
# We get the 'initial' keyword argument or initialize it
# as a dict if it didn't exist.
#if kwargs.get("instance"):
initial = kwargs.setdefault("initial", {})
# The widget for a ModelMultipleChoiceField expects
# a list of primary key for the selected data.