fixes #322, fixed incorrect serializer instance usage

This commit is contained in:
Paul Bailey 2017-11-10 21:49:48 +00:00
parent 2600f0f041
commit e7391937dd

View File

@ -84,4 +84,9 @@ class SerializerMutation(ClientIDMutation):
@classmethod
def perform_mutate(cls, serializer, info):
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)