mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-02 16:05:29 +00:00
perf: 完善 setting 的动态配置
This commit is contained in:
@@ -94,7 +94,7 @@ def monkey_patch_settings(sender, **kwargs):
|
|||||||
def monkey_patch_getattr(self, name):
|
def monkey_patch_getattr(self, name):
|
||||||
val = getattr(self._wrapped, name)
|
val = getattr(self._wrapped, name)
|
||||||
# 只解析 defaults 中的 callable
|
# 只解析 defaults 中的 callable
|
||||||
if callable(val) and val.__module__ == 'jumpserver.conf':
|
if callable(val) and val.__module__.endswith('jumpserver.conf'):
|
||||||
val = val()
|
val = val()
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user