Skip to content

Commit

Permalink
fix: resolve unreachable exception when schema is not a class
Browse files Browse the repository at this point in the history
  • Loading branch information
philippwaller authored Jan 10, 2025
1 parent be4831b commit 7a69841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion voluptuous_serialize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def convert(schema, *, custom_serializer=None):
if isinstance(schema, (str, int, float, bool)):
return {"type": "constant", "value": schema}

if issubclass(schema, Enum):
if if isinstance(schema, type) and issubclass(schema, Enum):
return {
"type": "select",
"options": [(item.value, item.value) for item in schema],
Expand Down

0 comments on commit 7a69841

Please sign in to comment.