perf: 修改资产名称

This commit is contained in:
ibuler
2022-08-11 15:45:03 +08:00
parent 4021baf758
commit d402ba5d92
44 changed files with 194 additions and 161 deletions

View File

@@ -28,7 +28,7 @@ def sync_node(src, target, cut=False):
asset.save()
new_asset = asset
else:
new_asset = get_object_or_none(Asset, hostname=asset.hostname, org_id=target.org_id)
new_asset = get_object_or_none(Asset, hostname=asset.name, org_id=target.org_id)
if new_asset is None:
asset.id = None
asset.org_id = target.org_id