Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
perf: check empty notification in the right way
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNitroG committed Jan 7, 2025
1 parent ca9ec33 commit c66917e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/check_phat_nguoi/notify/send_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ async def _send_messages(self, notification: BaseNotificationDTO) -> None:
await self._tele.send(notification.telegram, self._md_messages)

async def send(self) -> None:
enabled_notifications: tuple[TelegramNotificationDTO, ...] = tuple(
enabled_notifications: tuple[BaseNotificationDTO, ...] = tuple(
notification
for notification in config.notifications
if notification.enabled
)
if len(enabled_notifications) == 0:
if not enabled_notifications:
return
self._md_messages = tuple(
MarkdownMessage(plate_info).generate_message()
Expand Down

0 comments on commit c66917e

Please sign in to comment.