fix: 修复创建资产关联所在节点的系统用户时没有设置组织ID的问题

This commit is contained in:
Bai 2021-07-15 16:03:44 +08:00 committed by Jiangjie.Bai
parent 9d4121c3b7
commit 47e8ad3aac

View File

@ -96,7 +96,8 @@ def on_asset_nodes_add(instance, action, reverse, pk_set, **kwargs):
asset_ids_to_push.append(asset_id) asset_ids_to_push.append(asset_id)
to_create.append(m2m_model( to_create.append(m2m_model(
systemuser_id=system_user_id, systemuser_id=system_user_id,
asset_id=asset_id asset_id=asset_id,
org_id=instance.org_id
)) ))
if asset_ids_to_push: if asset_ids_to_push:
push_system_user_to_assets.delay(system_user_id, asset_ids_to_push) push_system_user_to_assets.delay(system_user_id, asset_ids_to_push)