Skip to content

Commit 8ebe39f

Browse files
typo
1 parent b7706ad commit 8ebe39f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

models/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ def cast_element_to_type(value: Any, expected_type, prop_name: str):
160160
except ValueError:
161161
pass
162162

163-
elif _is_instance_of_type(value, inner_type):
163+
# if the loop hasn't returned yet, check directly by type
164+
if _is_instance_of_type(value, inner_type):
164165
return cast_element_to_type(value, inner_type, prop_name)
165166

166167
elif is_dataclass(expected_type):

0 commit comments

Comments
 (0)