From e1eef0a3f3347f8ad02ce6de48449be3aba5d3fb Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Fri, 24 Sep 2021 20:14:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dauthbook=20systemuser?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/tasks/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/assets/tasks/common.py b/apps/assets/tasks/common.py index 322a64fe1..ad2749e29 100644 --- a/apps/assets/tasks/common.py +++ b/apps/assets/tasks/common.py @@ -19,7 +19,7 @@ def add_nodes_assets_to_system_users(nodes_keys, system_users): """ 解决资产和节点进行关联时,已经关联过的节点不会触发 authbook post_save 信号, 无法更新节点下所有资产的管理用户的问题 """ for asset in assets: - defaults = {'asset': asset, 'system_user': system_user} + defaults = {'asset': asset, 'systemuser': system_user, 'org_id': asset.org_id} instance, created = AuthBook.objects.update_or_create( defaults=defaults, asset=asset, systemuser=system_user )