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

Commit

Permalink
refactor: replace datetime function with string converting
Browse files Browse the repository at this point in the history
  • Loading branch information
NTGNguyen committed Dec 27, 2024
1 parent b585f25 commit a27daac
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/check_phat_nguoi/modules/notify/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from check_phat_nguoi.context import PlateInfoModel, PlatesModel
from check_phat_nguoi.utils.constants import (
DATETIME_FORMAT_CHECKPHATNGUOI,
MESSAGE_MARKDOWN_PATTERN,
RESOLUTION_LOCATION_MARKDOWN_PATTERN,
)
Expand Down Expand Up @@ -41,13 +40,12 @@ def format_message(
owner=plate_info_context.owner,
action=vio.action,
status=vio.status,
date=vio.date.strftime(
DATETIME_FORMAT_CHECKPHATNGUOI,
location=vio.enforcement_unit,
resolution_locations=Message.format_location(vio.resolution_office),
),
date=f"{vio.date}",
location=vio.enforcement_unit,
resolution_locations=Message.format_location(vio.resolution_office),
)
for vio in plate_info_context.violation
if vio.status
]

def format_messages(self) -> dict[str, list[LiteralString]]:
Expand Down

0 comments on commit a27daac

Please sign in to comment.