mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
Use cls
This commit is contained in:
parent
c5d170cb84
commit
58e770fbaa
|
@ -192,4 +192,4 @@ class ErrorType(ObjectType):
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_errors(cls, errors):
|
def from_errors(cls, errors):
|
||||||
data = camelize(errors) if graphene_settings.CAMELCASE_ERRORS else errors
|
data = camelize(errors) if graphene_settings.CAMELCASE_ERRORS else errors
|
||||||
return [ErrorType(field=key, messages=value) for key, value in data.items()]
|
return [cls(field=key, messages=value) for key, value in data.items()]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user