mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
fixed get_node method. Updated with graphene-django
This commit is contained in:
parent
02afb15d85
commit
7091216c14
|
@ -150,7 +150,6 @@ class DjangoObjectType(ObjectType):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_node(cls, info, id):
|
def get_node(cls, info, id):
|
||||||
queryset = cls.get_queryset(cls._meta.model.objects, info)
|
|
||||||
try:
|
try:
|
||||||
return cls._meta.model.nodes.get(uid=id)
|
return cls._meta.model.nodes.get(uid=id)
|
||||||
except DoesNotExist:
|
except DoesNotExist:
|
||||||
|
|
|
@ -3,8 +3,10 @@ from .utils import (
|
||||||
get_reverse_fields,
|
get_reverse_fields,
|
||||||
maybe_queryset,
|
maybe_queryset,
|
||||||
get_model_fields,
|
get_model_fields,
|
||||||
is_valid_django_model,
|
is_valid_neomodel_model,
|
||||||
import_single_dispatch,
|
import_single_dispatch,
|
||||||
|
is_parent_set,
|
||||||
|
pagination_params,
|
||||||
)
|
)
|
||||||
from .testing import GraphQLTestCase
|
from .testing import GraphQLTestCase
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user