mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-23 07:00:56 +03:00
Only use unicode type in OmniScalar if six.PY2
This commit is contained in:
parent
98f20fe52b
commit
cae40be453
|
@ -175,12 +175,14 @@ class OmniScalar(Scalar):
|
|||
|
||||
_scalar_type_map = {
|
||||
str: String,
|
||||
unicode: String,
|
||||
bool: Boolean,
|
||||
int: Int,
|
||||
float: Float,
|
||||
}
|
||||
|
||||
if six.PY2:
|
||||
_scalar_type_map[unicode] = String
|
||||
|
||||
@staticmethod
|
||||
def serialize(value):
|
||||
scalar_type = OmniScalar._scalar_type_map.get(type(value))
|
||||
|
|
Loading…
Reference in New Issue
Block a user