fix: define tz variable in cmd_update before using it

The cmd_update function was missing the tz = ZoneInfo(timezone_str) conversion.
This caused "tz is not defined" error when confirming edits.
This commit is contained in:
shokollm
2026-04-05 02:08:01 +00:00
parent b85806f3ad
commit 22c7d8f4f5

View File

@@ -418,6 +418,11 @@ async def cmd_update(update: Update, ctx: ContextTypes.DEFAULT_TYPE) -> None:
room_id = get_room_id(update) room_id = get_room_id(update)
timezone_str = BOUNTY_SERVICE.get_timezone(room_id) timezone_str = BOUNTY_SERVICE.get_timezone(room_id)
try:
tz = ZoneInfo(timezone_str)
except (KeyError, ZoneInfoNotFoundError):
tz = ZoneInfo("UTC")
text, link, due_date_ts, clear_link, clear_date = parse_args(args[1:], timezone_str) text, link, due_date_ts, clear_link, clear_date = parse_args(args[1:], timezone_str)
if ( if (
not text not text