Skip to content

Commit c5bc910

Browse files
authored
Merge pull request #583 from superannotateai/literal_validator
fix make_literal_validator
2 parents a300522 + 70c1e51 commit c5bc910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/superannotate/lib/infrastructure/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def make_literal_validator(
2727
def literal_validator(v: typing.Any) -> typing.Any:
2828
try:
2929
return allowed_choices[v.lower()]
30-
except KeyError:
30+
except (KeyError, AttributeError):
3131
raise WrongConstantError(given=v, permitted=permitted_choices)
3232

3333
return literal_validator

0 commit comments

Comments
 (0)