mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-03 03:43:28 +03:00
parent
c632d05a10
commit
5427e2c939
|
@ -45,7 +45,13 @@ class BaseDjangoFormMutation(ClientIDMutation):
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
return cls.perform_mutate(form, info)
|
return cls.perform_mutate(form, info)
|
||||||
else:
|
else:
|
||||||
errors = ErrorType.from_errors(form.errors)
|
errors = [
|
||||||
|
ErrorType(
|
||||||
|
field=to_camel_case(key) if key != "__all__" else key,
|
||||||
|
messages=value,
|
||||||
|
)
|
||||||
|
for key, value in form.errors.items()
|
||||||
|
]
|
||||||
|
|
||||||
return cls(errors=errors, **form.data)
|
return cls(errors=errors, **form.data)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user