mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-29 04:53:43 +03:00
Fix force_str deprecation warning (#858)
This commit is contained in:
parent
62ecbae614
commit
8ec456285b
|
@ -1,6 +1,6 @@
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_str
|
||||||
|
|
||||||
from graphene import (
|
from graphene import (
|
||||||
ID,
|
ID,
|
||||||
|
@ -30,7 +30,7 @@ singledispatch = import_single_dispatch()
|
||||||
|
|
||||||
|
|
||||||
def convert_choice_name(name):
|
def convert_choice_name(name):
|
||||||
name = to_const(force_text(name))
|
name = to_const(force_str(name))
|
||||||
try:
|
try:
|
||||||
assert_valid_name(name)
|
assert_valid_name(name)
|
||||||
except AssertionError:
|
except AssertionError:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user