mirror of
				https://github.com/veops/cmdb.git
				synced 2025-11-04 05:36:17 +08:00 
			
		
		
		
	Merge pull request #22 from lovvvve/FixDelCi_type
fix(ci_type api): fix the judgment condition of deleting ci_type
This commit is contained in:
		@@ -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):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user