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