Skip to content

Commit f528c5a

Browse files
authored
Update has_content method to check content data
1 parent 359c6d2 commit f528c5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydantic_ai_slim/pydantic_ai/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ class FilePart:
10601060

10611061
def has_content(self) -> bool:
10621062
"""Return `True` if the file content is non-empty."""
1063-
return bool(self.content) # pragma: no cover
1063+
return bool(self.content.data) # pragma: no cover
10641064

10651065
__repr__ = _utils.dataclasses_no_defaults_repr
10661066

0 commit comments

Comments
 (0)