Skip to content

Commit

Permalink
fix - returning none in image property
Browse files Browse the repository at this point in the history
  • Loading branch information
jjpaulo2 committed Oct 4, 2024
1 parent 4c7a343 commit 14de5b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion function/telegram/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def chat_id(self) -> str:

@cached_property
def image(self) -> str | None:
return self.message.images[0]
if self.message.images:
return self.message.images[0]
return None

@cached_property
def album(self) -> list[InputMediaPhoto]:
Expand Down

0 comments on commit 14de5b3

Please sign in to comment.