Skip to content

Commit

Permalink
fix: get_user_info_text status bug
Browse files Browse the repository at this point in the history
  • Loading branch information
erfjab committed Jul 18, 2024
1 parent 13a15a1 commit a188fdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/telegram/handlers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def get_user_info_text(
'expired': '🕰',
'limited': '🪫',
'disabled': '❌',
'onhold': '🔌',
'on_hold': '🔌',
}
text = f'''\
┌─{statuses[status]} <b>Status:</b> <code>{status.title()}</code>
Expand All @@ -513,7 +513,7 @@ def get_user_info_text(
│ └─<b>Data Used:</b> <code>{readable_size(usage) if usage else "-"}</code>
'''
if status == 'onhold':
if status == UserStatus.on_hold:
if on_hold_timeout:
if isinstance(on_hold_timeout, int):
timeout_str = datetime.fromtimestamp(on_hold_timeout).strftime("%Y-%m-%d")
Expand Down

0 comments on commit a188fdb

Please sign in to comment.