Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/a2a/utils/proto_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def parse_params(params: QueryParams, message: ProtobufMessage) -> None:
field = fields[k]
v_list = params.getlist(k)

if field.label == field.LABEL_REPEATED:
if field.label == FieldDescriptor.LABEL_REPEATED:
accumulated: list[Any] = []
for v in v_list:
if not v:
Expand Down Expand Up @@ -208,7 +208,7 @@ def _check_required_field_violation(
) -> ValidationDetail | None:
"""Check if a required field is missing or invalid."""
val = getattr(msg, field.name)
if field.is_repeated:
if field.label == FieldDescriptor.LABEL_REPEATED:
if not val:
return ValidationDetail(
field=field.name,
Expand Down Expand Up @@ -249,7 +249,7 @@ def _recurse_validation(
return errors

val = getattr(msg, field.name)
if not field.is_repeated:
if field.label != FieldDescriptor.LABEL_REPEATED:
if msg.HasField(field.name):
sub_errs = _validate_proto_required_fields_internal(val)
_append_nested_errors(errors, field.name, sub_errs)
Expand Down
Loading