From 42bcc2e51080087cb3f45845d2060c5f8113e207 Mon Sep 17 00:00:00 2001 From: pycook Date: Tue, 12 Nov 2019 11:15:25 +0800 Subject: [PATCH] fix py3 --- api/commands/click_cmdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/commands/click_cmdb.py b/api/commands/click_cmdb.py index 3886d55..6b2634d 100644 --- a/api/commands/click_cmdb.py +++ b/api/commands/click_cmdb.py @@ -19,8 +19,8 @@ def init_cache(): cis = CI.get_by(to_dict=False) for ci in cis: - - if list(filter(lambda x: x, rd.get([ci.id]))): + res = rd.get([ci.id]) + if res and list(filter(lambda x: x, res)): continue m = api.lib.cmdb.ci.CIManager()