Skip to content

Commit 80f7a09

Browse files
committed
📝 Fix type alias check to ensure check_type is not empty before validation
1 parent fc9a2e6 commit 80f7a09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎sqlmodel/_compat.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _is_typing_type_instance(annotation: Any, type_name: str) -> bool:
207207
if hasattr(typing_extensions, type_name):
208208
check_type.append(getattr(typing_extensions, type_name))
209209

210-
return check_type and isinstance(annotation, tuple(check_type))
210+
return bool(check_type) and isinstance(annotation, tuple(check_type))
211211

212212
def _is_new_type_instance(annotation: Any) -> bool:
213213
return _is_typing_type_instance(annotation, "NewType")

0 commit comments

Comments
 (0)