Skip to content

Commit 4e1bd0b

Browse files
committed
fix: email random value generation
1 parent 611b468 commit 4e1bd0b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

scim2_tester/filling.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,11 @@ def generate_random_value(
7676

7777
is_email = urn and (
7878
urn.endswith("emails.value")
79-
or (
80-
field_name == "value"
81-
and (field_type and "email" in field_type.__name__.lower())
82-
)
79+
or (field_name == "value" and "email" in model.__name__.lower())
8380
)
8481
is_phone = urn and (
8582
urn.endswith("phoneNumbers.value")
86-
or (
87-
field_name == "value"
88-
and (field_type and "phone" in field_type.__name__.lower())
89-
)
83+
or (field_name == "value" and "phone" in model.__name__.lower())
9084
)
9185

9286
value: Any

0 commit comments

Comments
 (0)