fix: 修复设置未分组节点显示单独授权资产的配置时,用户授权树没有变化的问题

pull/6845/head
Michael Bai 2021-09-14 14:46:13 +08:00 committed by Jiangjie.Bai
parent 068db6d1ca
commit a26c5a5e32
1 changed files with 4 additions and 2 deletions

View File

@ -33,8 +33,10 @@ setting_pub_sub = SettingSubPub()
@receiver(post_save, sender=Setting)
@on_transaction_commit
def refresh_settings_on_changed(sender, instance=None, **kwargs):
if instance:
setting_pub_sub.publish(instance.name)
if not instance:
return
setting_pub_sub.publish(instance.name)
# 配置变化: PERM_SINGLE_ASSET_TO_UNGROUP_NODE
if instance.name == 'PERM_SINGLE_ASSET_TO_UNGROUP_NODE':