From 89f10f22390d9e6b0add9af526d9d5848284a96e Mon Sep 17 00:00:00 2001
From: Lovvvve <lovvvve+github@gmail.com>
Date: Tue, 10 Dec 2019 14:31:27 +0800
Subject: [PATCH] fix(ci_type api): fix the judgment condition of deleting
 ci_type

---
 api/lib/cmdb/ci_type.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/api/lib/cmdb/ci_type.py b/api/lib/cmdb/ci_type.py
index 8d9f634..6f858af 100644
--- a/api/lib/cmdb/ci_type.py
+++ b/api/lib/cmdb/ci_type.py
@@ -112,7 +112,7 @@ class CITypeManager(object):
     def delete(cls, type_id):
         ci_type = cls.check_is_existed(type_id)
 
-        if CI.get_by(type_id=type_id, first=True, to_dict=False) is not False:
+        if CI.get_by(type_id=type_id, first=True, to_dict=False):
             return abort(400, "cannot delete, because CI instance exists")
 
         for item in CITypeRelation.get_by(parent_id=type_id, to_dict=False):