From ef36b2e66265de4f196d2a90ac8444c9a7b74063 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 6 Apr 2022 14:58:13 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=AE=8C=E5=96=84=20setting=20?= =?UTF-8?q?=E7=9A=84=E5=8A=A8=E6=80=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/settings/signal_handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/signal_handlers.py b/apps/settings/signal_handlers.py index 818b7ba03..18449a771 100644 --- a/apps/settings/signal_handlers.py +++ b/apps/settings/signal_handlers.py @@ -94,7 +94,7 @@ def monkey_patch_settings(sender, **kwargs): def monkey_patch_getattr(self, name): val = getattr(self._wrapped, name) # 只解析 defaults 中的 callable - if callable(val) and val.__module__ == 'jumpserver.conf': + if callable(val) and val.__module__.endswith('jumpserver.conf'): val = val() return val