This commit is contained in:
ariel1899 2020-04-17 14:54:18 -04:00
parent 4120971d11
commit c632d05a10

View File

@ -45,13 +45,7 @@ class BaseDjangoFormMutation(ClientIDMutation):
if form.is_valid():
return cls.perform_mutate(form, info)
else:
errors = [
ErrorType(
field=to_camel_case(key) if key != "__all__" else key,
messages=value,
)
for key, value in form.errors.items()
]
errors = ErrorType.from_errors(form.errors)
return cls(errors=errors, **form.data)