Skip to content

Commit 21b292b

Browse files
committed
Ensure that Literal exists
Python < 3.8 does not support it
1 parent 480086b commit 21b292b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphene_pydantic/converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def convert_generic_python_type(
266266
return convert_union_type(
267267
type_, field, registry, parent_type=parent_type, model=model
268268
)
269-
elif origin == T.Literal:
269+
elif hasattr(T, "Literal") and origin == T.Literal:
270270
return convert_literal_type(
271271
type_, field, registry, parent_type=parent_type, model=model
272272
)

0 commit comments

Comments
 (0)