fix 500 error

master
Aevann 2024-05-17 17:03:08 +03:00
parent 63710ecef6
commit d7a2226fdb
2 changed files with 5 additions and 5 deletions

View File

@ -177,10 +177,7 @@ 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):
if v:
listing, total, page = modmail_listing(v)
else:
listing, total, page = None, None, None
listing, total, page = modmail_listing(v)
if v.client: return {"data":[x.json for x in listing]}

View File

@ -281,7 +281,10 @@ def api(v):
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
@auth_desired
def contact(v):
listing, total, page = modmail_listing(v)
if v:
listing, total, page = modmail_listing(v)
else:
listing, total, page = None, None, None
return render_template("contact.html",
v=v,
listing=listing,