From 156a90b97ac42666ea89a85e12814aa221b5284e Mon Sep 17 00:00:00 2001 From: dcd <1151627903@qq.com> Date: Sun, 29 Sep 2024 15:59:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dhost=5Fsearch=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=B8=9A=E5=8A=A1=E6=8B=93=E6=89=91=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=20(closed=20#2449)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/node_man/handlers/cmdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/node_man/handlers/cmdb.py b/apps/node_man/handlers/cmdb.py index 06c7d7b0c..298da62cd 100644 --- a/apps/node_man/handlers/cmdb.py +++ b/apps/node_man/handlers/cmdb.py @@ -217,7 +217,8 @@ def cmdb_or_cache_topo(self, username: str, user_biz: dict, biz_host_id_map: dic user_page_topology_cache = cache.get(username + "_" + str(biz_host_id_map) + "_topo_cache") if user_page_topology_cache: - # 如果存在缓存则返回 + # 如果存在缓存则返回,缓存读出来的key为str,适配后续逻辑转化成整型 + user_page_topology_cache = {int(key): value for key, value in user_page_topology_cache.items()} return user_page_topology_cache else: # 缓存已过期,重新获取