Skip to content

Commit d0cfee5

Browse files
authored
Make UUID compatible (Fixed issue #936) (#937)
* Make UUID compatible * Fix typo * black code formatting
1 parent bcbb66c commit d0cfee5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

graphene/types/uuid.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from __future__ import absolute_import
2-
2+
import six
33
from uuid import UUID as _UUID
44

55
from graphql.language import ast
@@ -12,8 +12,9 @@ class UUID(Scalar):
1212

1313
@staticmethod
1414
def serialize(uuid):
15-
if isinstance(uuid, str):
15+
if isinstance(uuid, six.string_types):
1616
uuid = _UUID(uuid)
17+
1718
assert isinstance(uuid, _UUID), "Expected UUID instance, received {}".format(
1819
uuid
1920
)

0 commit comments

Comments
 (0)