Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
MothScientist committed Dec 16, 2024
1 parent befe29e commit 74aec48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion budget_graph/db_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def get_user_timezone_by_telegram_id(self, telegram_id: int) -> int | None:
with self.__conn as conn:
with conn.cursor() as cur:
cur.execute(read_sql_file('get_user_timezone_by_telegram_id'), {'telegram_id': telegram_id})
return res[0] if (res := cur.fetchone()) else None # TODO - посмотреть вернет ли res[0] None при отсутствии записи
return cur.fetchone()[0]

except (DatabaseError, TypeError) as err:
logger_database.error(f"[DB_QUERY] {str(err)}, "
Expand Down

0 comments on commit 74aec48

Please sign in to comment.