mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-07 15:10:35 +03:00
fixes #322, fixed incorrect serializer instance usage
This commit is contained in:
parent
2600f0f041
commit
e7391937dd
|
@ -84,4 +84,9 @@ class SerializerMutation(ClientIDMutation):
|
||||||
@classmethod
|
@classmethod
|
||||||
def perform_mutate(cls, serializer, info):
|
def perform_mutate(cls, serializer, info):
|
||||||
obj = serializer.save()
|
obj = serializer.save()
|
||||||
return cls(errors=None, **obj)
|
|
||||||
|
kwargs = {}
|
||||||
|
for f, field in serializer.fields.items():
|
||||||
|
kwargs[f] = field.get_attribute(obj)
|
||||||
|
|
||||||
|
return cls(errors=None, **kwargs)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user