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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user