perf: 完善 setting 的动态配置

pull/8031/head
Eric 3 years ago committed by 老广
parent fe8527fd07
commit ef36b2e662

@ -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

Loading…
Cancel
Save