mirror of
				https://github.com/veops/cmdb.git
				synced 2025-10-31 11:09:21 +08:00 
			
		
		
		
	| @@ -62,7 +62,7 @@ QUERY_CI_BY_ATTR_NAME = """ | |||||||
| QUERY_CI_BY_ID = """ | QUERY_CI_BY_ID = """ | ||||||
|     SELECT c_cis.id as ci_id |     SELECT c_cis.id as ci_id | ||||||
|     FROM c_cis |     FROM c_cis | ||||||
|     WHERE c_cis.id={} |     WHERE c_cis.id {} | ||||||
| """ | """ | ||||||
|  |  | ||||||
| QUERY_CI_BY_TYPE = """ | QUERY_CI_BY_TYPE = """ | ||||||
|   | |||||||
| @@ -138,7 +138,10 @@ class Search(object): | |||||||
|  |  | ||||||
|     @staticmethod |     @staticmethod | ||||||
|     def _id_query_handler(v): |     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 |     @staticmethod | ||||||
|     def _in_query_handler(attr, v, is_not): |     def _in_query_handler(attr, v, is_not): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user