0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00

Return the created submission instance

This commit is contained in:
cho-leukeleu 2017-07-04 08:23:15 +02:00 committed by Karl Hobley
parent b6e01515cb
commit 283d282d31

View File

@ -230,7 +230,7 @@ class AbstractForm(Page):
For example, if you want to save reference to a user. For example, if you want to save reference to a user.
""" """
self.get_submission_class().objects.create( return self.get_submission_class().objects.create(
form_data=json.dumps(form.cleaned_data, cls=DjangoJSONEncoder), form_data=json.dumps(form.cleaned_data, cls=DjangoJSONEncoder),
page=self, page=self,
) )