mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-25 11:23:45 +03:00
Merge pull request #19 from revolico/camel-case-all-fields#17
removing django dependency
This commit is contained in:
commit
200353d014
|
@ -1,6 +1,5 @@
|
|||
# from django import forms
|
||||
from collections import OrderedDict
|
||||
from django.forms import ALL_FIELDS
|
||||
import graphene
|
||||
from graphene import Field, InputField
|
||||
from graphene.relay.mutation import ClientIDMutation
|
||||
|
@ -47,7 +46,7 @@ class BaseDjangoFormMutation(ClientIDMutation):
|
|||
return cls.perform_mutate(form, info)
|
||||
else:
|
||||
errors = [
|
||||
ErrorType(field=to_camel_case(key) if key != ALL_FIELDS else key, messages=value)
|
||||
ErrorType(field=to_camel_case(key) if key != '__all__' else key, messages=value)
|
||||
for key, value in form.errors.items()
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user