mirror of
				https://github.com/veops/cmdb.git
				synced 2025-11-04 21:56:16 +08:00 
			
		
		
		
	@@ -62,7 +62,7 @@ QUERY_CI_BY_ATTR_NAME = """
 | 
			
		||||
QUERY_CI_BY_ID = """
 | 
			
		||||
    SELECT c_cis.id as ci_id
 | 
			
		||||
    FROM c_cis
 | 
			
		||||
    WHERE c_cis.id={}
 | 
			
		||||
    WHERE c_cis.id {}
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
QUERY_CI_BY_TYPE = """
 | 
			
		||||
 
 | 
			
		||||
@@ -138,7 +138,10 @@ class Search(object):
 | 
			
		||||
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    def _id_query_handler(v):
 | 
			
		||||
        return QUERY_CI_BY_ID.format(v)
 | 
			
		||||
        if ";" in v:
 | 
			
		||||
            return QUERY_CI_BY_ID.format("in {}".format(v.replace(';', ',')))
 | 
			
		||||
        else:
 | 
			
		||||
            return QUERY_CI_BY_ID.format("= {}".format(v))
 | 
			
		||||
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    def _in_query_handler(attr, v, is_not):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user