From 64fb4c7a9252ed11334cd84e06bc9d0f7e6c2160 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 28 Feb 2023 19:13:38 +0200 Subject: [PATCH] put unapproved apps before approved apps --- files/routes/oauth.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/routes/oauth.py b/files/routes/oauth.py index da16474ee..2f9350bdb 100644 --- a/files/routes/oauth.py +++ b/files/routes/oauth.py @@ -292,7 +292,11 @@ def admin_app_id_comments(v, aid): @admin_level_required(PERMS['APPS_MODERATION']) def admin_apps_list(v): - apps = g.db.query(OauthApp).order_by(OauthApp.id.desc()).all() + not_approved = g.db.query(OauthApp).filter(OauthApp.client_id == None).order_by(OauthApp.id.desc()).all() + + approved = g.db.query(OauthApp).filter(OauthApp.client_id != None).order_by(OauthApp.id.desc()).all() + + apps = not_approved + approved return render_template("admin/apps.html", v=v, apps=apps)