Revert "Change"

This reverts commit c632d05a
This commit is contained in:
ariel1899 2020-04-17 16:00:46 -04:00
parent c632d05a10
commit 5427e2c939

View File

@ -45,7 +45,13 @@ class BaseDjangoFormMutation(ClientIDMutation):
if form.is_valid():
return cls.perform_mutate(form, info)
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)