We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3d1ad6 commit 36ebd8cCopy full SHA for 36ebd8c
1 file changed
src/a2a/utils/proto_utils.py
@@ -208,7 +208,7 @@ def _check_required_field_violation(
208
) -> ValidationDetail | None:
209
"""Check if a required field is missing or invalid."""
210
val = getattr(msg, field.name)
211
- if field.is_repeated:
+ if field.label == field.LABEL_REPEATED:
212
if not val:
213
return ValidationDetail(
214
field=field.name,
@@ -249,7 +249,7 @@ def _recurse_validation(
249
return errors
250
251
252
- if not field.is_repeated:
+ if field.label != field.LABEL_REPEATED:
253
if msg.HasField(field.name):
254
sub_errs = _validate_proto_required_fields_internal(val)
255
_append_nested_errors(errors, field.name, sub_errs)
0 commit comments