From 3fd043bb9bb90a0db2990e75d6d917e7db9363c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=AF=E5=A4=A7=E4=BE=A0?= Date: Thu, 28 Mar 2024 02:01:04 +0800 Subject: [PATCH] fix #1761 --- app/core/module.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/core/module.py b/app/core/module.py index 685074f6..1b8828ba 100644 --- a/app/core/module.py +++ b/app/core/module.py @@ -78,9 +78,12 @@ class ModuleManager(metaclass=Singleton): if not setting: return True switch, value = setting - if getattr(settings, switch) and value is True: + option = getattr(settings, switch) + if not option: + return False + if option and value is True: return True - if value in getattr(settings, switch): + if value in option: return True return False