We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b8baa5 commit ca3c8a9Copy full SHA for ca3c8a9
backend/src/models/utils/pre_validator_utils.py
@@ -69,9 +69,8 @@ def for_list(
69
if len(field_value) == 0:
70
raise ValueError(f"{field_location} must be a non-empty array")
71
72
- if max_length:
73
- if len(field_value) > max_length:
74
- raise ValueError(f"{field_location} must be an array of maximum length {max_length}")
+ if max_length is not None and len(field_value) > max_length:
+ raise ValueError(f"{field_location} must be an array of maximum length {max_length}")
75
76
if elements_are_strings:
77
for idx, element in enumerate(field_value):
0 commit comments