From 9a2229ab10b1f54b9d14595dfeaa984b45d7602d Mon Sep 17 00:00:00 2001 From: pycook Date: Thu, 28 Nov 2024 19:22:26 +0800 Subject: [PATCH] fix(api): ci relation search --- cmdb-api/api/lib/cmdb/search/ci_relation/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdb-api/api/lib/cmdb/search/ci_relation/search.py b/cmdb-api/api/lib/cmdb/search/ci_relation/search.py index e3bb34f..94be1ce 100644 --- a/cmdb-api/api/lib/cmdb/search/ci_relation/search.py +++ b/cmdb-api/api/lib/cmdb/search/ci_relation/search.py @@ -64,7 +64,7 @@ class Search(object): self.ancestor_ids = ancestor_ids self.descendant_ids = descendant_ids - self.root_parent_path = root_parent_path + self.root_parent_path = root_parent_path or [] self.has_m2m = has_m2m or False if not self.has_m2m: if self.ancestor_ids: