Skip to content

Commit 66073cf

Browse files
Apply suggestions from code review
Co-authored-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
1 parent ce4c828 commit 66073cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/a2a/utils/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def new_task(request: Message) -> Task:
3131
if not request.parts:
3232
raise ValueError('Message parts cannot be empty')
3333
for part in request.parts:
34-
if part.text is not None and not part.text:
34+
if part.HasField('text') and not part.text:
3535
raise ValueError('Message.text cannot be empty')
3636

3737
return Task(

0 commit comments

Comments
 (0)