mirror of https://github.com/veops/cmdb.git
parent
693ae4ff05
commit
f788adc8cf
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue