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()