mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-05-12 20:03:48 +03:00
Fix import on python 2
This commit is contained in:
parent
dc86e4e9a1
commit
2fd3cb032c
|
@ -1,10 +1,12 @@
|
||||||
from functools import singledispatch
|
|
||||||
|
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
import graphene
|
import graphene
|
||||||
|
|
||||||
|
from ..utils import import_single_dispatch
|
||||||
|
|
||||||
|
singledispatch = import_single_dispatch()
|
||||||
|
|
||||||
|
|
||||||
@singledispatch
|
@singledispatch
|
||||||
def convert_serializer_field(field):
|
def convert_serializer_field(field):
|
||||||
|
@ -53,5 +55,3 @@ def convert_serializer_field_to_bool(field):
|
||||||
@required_if_input_and_required
|
@required_if_input_and_required
|
||||||
def convert_serializer_field_to_float(field):
|
def convert_serializer_field_to_float(field):
|
||||||
return graphene.Float
|
return graphene.Float
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user