fix 500 err

pull/226/head
Aevann 2024-05-17 00:36:00 +03:00
parent e8ca6f3107
commit 2c14d23e7b
1 changed files with 4 additions and 1 deletions

View File

@ -177,7 +177,10 @@ def modmail_listing(v):
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@admin_level_required(PERMS['VIEW_MODMAIL'])
def notifications_modmail(v):
listing, total, page = modmail_listing(v)
if v:
listing, total, page = modmail_listing(v)
else:
listing, total, page = None, None, None
if v.client: return {"data":[x.json for x in listing]}