Skip to content

Commit e303b4f

Browse files
committed
perf: 修复 settings patch 问题
1 parent 03fdaa0 commit e303b4f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/settings/signal_handlers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ def keep_subscribe_settings_change():
9393
def monkey_patch_settings(sender, **kwargs):
9494
def monkey_patch_getattr(self, name):
9595
val = getattr(self._wrapped, name)
96-
if callable(val):
96+
# 只解析 defaults 中的 callable
97+
if callable(val) and val.__module__ == 'jumpserver.conf':
9798
val = val()
9899
return val
99100

0 commit comments

Comments
 (0)