We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcbb66c commit d0cfee5Copy full SHA for d0cfee5
graphene/types/uuid.py
@@ -1,5 +1,5 @@
1
from __future__ import absolute_import
2
-
+import six
3
from uuid import UUID as _UUID
4
5
from graphql.language import ast
@@ -12,8 +12,9 @@ class UUID(Scalar):
12
13
@staticmethod
14
def serialize(uuid):
15
- if isinstance(uuid, str):
+ if isinstance(uuid, six.string_types):
16
uuid = _UUID(uuid)
17
+
18
assert isinstance(uuid, _UUID), "Expected UUID instance, received {}".format(
19
uuid
20
)
0 commit comments