mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 01:32:24 +03:00
Update mutation.py
This commit is contained in:
parent
7940a7b954
commit
a0a37df0b8
|
@ -47,7 +47,7 @@ class BaseDjangoFormMutation(ClientIDMutation):
|
|||
else:
|
||||
errors = ErrorType.from_errors(form.errors)
|
||||
|
||||
return cls(errors=errors)
|
||||
return cls(errors=errors, **form.data)
|
||||
|
||||
@classmethod
|
||||
def get_form(cls, root, info, **input):
|
||||
|
@ -122,7 +122,7 @@ class DjangoFormMutation(BaseDjangoFormMutation):
|
|||
@classmethod
|
||||
def perform_mutate(cls, form, info):
|
||||
form.save()
|
||||
return cls(errors=[])
|
||||
return cls(errors=[], **form.cleaned_data)
|
||||
|
||||
|
||||
class DjangoModelDjangoFormMutationOptions(DjangoFormMutationOptions):
|
||||
|
|
Loading…
Reference in New Issue
Block a user