From 55b55f61622a4e740d19f1ee5e7623c5b531fa11 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 21 Jan 2019 11:58:51 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E8=8A=82=E7=82=B9=E6=97=B6=EF=BC=8C=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E4=B8=BA=E4=B8=8B=E9=9D=A2=E7=9A=84=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=B5=84=E4=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/api/node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/assets/api/node.py b/apps/assets/api/node.py index 4fc030e1e..cc12f9b9c 100644 --- a/apps/assets/api/node.py +++ b/apps/assets/api/node.py @@ -259,7 +259,7 @@ class RefreshNodeHardwareInfoApi(APIView): def get(self, request, *args, **kwargs): node_id = kwargs.get('pk') node = get_object_or_404(self.model, id=node_id) - assets = node.assets.all() + assets = node.get_all_assets() # task_name = _("更新节点资产硬件信息: {}".format(node.name)) task_name = _("Update node asset hardware information: {}").format(node.name) task = update_assets_hardware_info_util.delay(assets, task_name=task_name) @@ -273,7 +273,7 @@ class TestNodeConnectiveApi(APIView): def get(self, request, *args, **kwargs): node_id = kwargs.get('pk') node = get_object_or_404(self.model, id=node_id) - assets = node.assets.all() + assets = node.get_all_assets() # task_name = _("测试节点下资产是否可连接: {}".format(node.name)) task_name = _("Test if the assets under the node are connectable: {}".format(node.name)) task = test_asset_connectivity_util.delay(assets, task_name=task_name)