diff --git a/apps/assets/signals_handler/authbook.py b/apps/assets/signals_handler/authbook.py index f42d8627e..513488763 100644 --- a/apps/assets/signals_handler/authbook.py +++ b/apps/assets/signals_handler/authbook.py @@ -37,8 +37,10 @@ def on_authbook_post_delete(sender, instance, **kwargs): def on_authbook_post_create(sender, instance, created, **kwargs): instance.sync_to_system_user_account() if created: + pass + # # 不再自动更新资产管理用户,只允许用户手动指定。 # 只在创建时进行更新资产的管理用户 - instance.update_asset_admin_user_if_need() + # instance.update_asset_admin_user_if_need() @receiver(pre_save, sender=AuthBook) diff --git a/apps/assets/tasks/common.py b/apps/assets/tasks/common.py index ad2749e29..06b656e24 100644 --- a/apps/assets/tasks/common.py +++ b/apps/assets/tasks/common.py @@ -23,5 +23,6 @@ def add_nodes_assets_to_system_users(nodes_keys, system_users): instance, created = AuthBook.objects.update_or_create( defaults=defaults, asset=asset, systemuser=system_user ) + # # 不再自动更新资产管理用户,只允许用户手动指定。 # 只要关联都需要更新资产的管理用户 - instance.update_asset_admin_user_if_need() + # instance.update_asset_admin_user_if_need()