mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
Fix duplicated ErrorType declaration
This commit is contained in:
parent
94486e0df1
commit
0fbdfba994
|
@ -14,7 +14,7 @@ from graphene.types.utils import yank_fields_from_attrs
|
|||
from graphene_django.registry import get_global_registry
|
||||
|
||||
from .converter import convert_form_field
|
||||
from .types import ErrorType
|
||||
from ..types import ErrorType
|
||||
|
||||
|
||||
def fields_for_form(form, only_fields, exclude_fields):
|
||||
|
|
|
@ -9,7 +9,7 @@ from graphene.relay.mutation import ClientIDMutation
|
|||
from graphene.types.objecttype import yank_fields_from_attrs
|
||||
|
||||
from .serializer_converter import convert_serializer_field
|
||||
from .types import ErrorType
|
||||
from ..types import ErrorType
|
||||
|
||||
|
||||
class SerializerMutationOptions(MutationOptions):
|
||||
|
|
|
@ -2,11 +2,6 @@ import graphene
|
|||
from graphene.types.unmountedtype import UnmountedType
|
||||
|
||||
|
||||
class ErrorType(graphene.ObjectType):
|
||||
field = graphene.String(required=True)
|
||||
messages = graphene.List(graphene.NonNull(graphene.String), required=True)
|
||||
|
||||
|
||||
class DictType(UnmountedType):
|
||||
key = graphene.String()
|
||||
value = graphene.String()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from collections import OrderedDict
|
||||
|
||||
from django.utils.functional import SimpleLazyObject
|
||||
import graphene
|
||||
from graphene import Field
|
||||
from graphene.relay import Connection, Node
|
||||
from graphene.types.objecttype import ObjectType, ObjectTypeOptions
|
||||
|
@ -133,3 +134,8 @@ class DjangoObjectType(ObjectType):
|
|||
return cls._meta.model.objects.get(pk=id)
|
||||
except cls._meta.model.DoesNotExist:
|
||||
return None
|
||||
|
||||
|
||||
class ErrorType(ObjectType):
|
||||
field = graphene.String(required=True)
|
||||
messages = graphene.List(graphene.NonNull(graphene.String), required=True)
|
||||
|
|
Loading…
Reference in New Issue
Block a user