mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-19 08:32:06 +03:00
Issue #380
This commit is contained in:
parent
e05f069b3b
commit
5bb36bbade
|
@ -74,12 +74,8 @@ class SerializerMutation(ClientIDMutation):
|
|||
if serializer.is_valid():
|
||||
return cls.perform_mutate(serializer, info)
|
||||
else:
|
||||
errors = [
|
||||
ErrorType(field=key, messages=value)
|
||||
for key, value in serializer.errors.items()
|
||||
]
|
||||
|
||||
return cls(errors=errors)
|
||||
errors = serializer.errors
|
||||
raise Exception(errors)
|
||||
|
||||
@classmethod
|
||||
def perform_mutate(cls, serializer, info):
|
||||
|
|
Loading…
Reference in New Issue
Block a user