Skip to content

Commit 0f71f2f

Browse files
committed
fix: defensive check on Reference in fillling.py
1 parent 583bc45 commit 0f71f2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scim2_tester/filling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def generate_random_value(
8282
elif field_type is bool:
8383
value = random.choice([True, False])
8484

85-
elif get_origin(field_type) is Reference:
85+
elif get_origin(field_type) is Reference and get_args(field_type)[0] != Any:
8686
ref_type = get_args(field_type)[0]
8787
if ref_type not in (ExternalReference, URIReference):
8888
model = model_from_ref_type(context, ref_type, different_than=obj.__class__)

0 commit comments

Comments
 (0)