From 9412f5ff137df1fdcaa927ea804ffb2fd3f82371 Mon Sep 17 00:00:00 2001 From: Horilla Date: Wed, 16 Jul 2025 14:53:09 +0530 Subject: [PATCH] [UPDT] HORILLA: Sidebar hasattr check before accessing MENU --- horilla/config.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/horilla/config.py b/horilla/config.py index 946f38d5b..a5409497c 100644 --- a/horilla/config.py +++ b/horilla/config.py @@ -52,10 +52,13 @@ def sidebar(request): if getattr(sidebar, "ACCESSIBILITY", None): accessibility = import_method(sidebar.ACCESSIBILITY) - if not accessibility or accessibility( - request, - sidebar.MENU, - PermWrapper(request.user), + if hasattr(sidebar, "MENU") and ( + not accessibility + or accessibility( + request, + sidebar.MENU, + PermWrapper(request.user), + ) ): MENU = {} MENU["menu"] = sidebar.MENU