From c78b932587cc19e502c3a963d7d3e3b1d5042314 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Mon, 3 Jun 2024 03:02:06 +0200 Subject: [PATCH] =?UTF-8?q?Oprava=20odhl=C3=A1=C5=A1en=C3=A9ho=20admina?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mamweb/admin.py b/mamweb/admin.py index d905f186..04d564cc 100644 --- a/mamweb/admin.py +++ b/mamweb/admin.py @@ -51,7 +51,8 @@ def get_app_list(self, request, app_label=None): 'prednasky', 'soustredeni', ] - app_list = [app_dict[label] for label in aplikace_nahore] + [app_dict[label] for label in app_dict if label not in aplikace_nahore] + # Odhlášený admin má prázdný app_dict :-/ + app_list = [app_dict[label] for label in aplikace_nahore if label in app_dict] + [app_dict[label] for label in app_dict if label not in aplikace_nahore] # Sort the models alphabetically within each app.