Skip to content

Commit a188fdb

Browse files
committed
fix: get_user_info_text status bug
1 parent 13a15a1 commit a188fdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/telegram/handlers/admin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def get_user_info_text(
503503
'expired': '🕰',
504504
'limited': '🪫',
505505
'disabled': '❌',
506-
'onhold': '🔌',
506+
'on_hold': '🔌',
507507
}
508508
text = f'''\
509509
┌─{statuses[status]} <b>Status:</b> <code>{status.title()}</code>
@@ -513,7 +513,7 @@ def get_user_info_text(
513513
│ └─<b>Data Used:</b> <code>{readable_size(usage) if usage else "-"}</code>
514514
515515
'''
516-
if status == 'onhold':
516+
if status == UserStatus.on_hold:
517517
if on_hold_timeout:
518518
if isinstance(on_hold_timeout, int):
519519
timeout_str = datetime.fromtimestamp(on_hold_timeout).strftime("%Y-%m-%d")

0 commit comments

Comments
 (0)