feat(api): fixed string-operators for requests search

This commit is contained in:
Taha Yassine Kraiem 2022-03-08 20:32:13 +01:00
parent 5b8046773d
commit 3c194ef8c7

View file

@ -827,6 +827,7 @@ def search_query_parts(data, error_status, errors_only, favorite_only, issue, pr
is_any = _isAny_opreator(f.operator)
if is_any or len(f.value) == 0:
continue
f.value = helper.values_for_operator(value=f.value, op=f.operator)
op = __get_sql_operator(f.operator)
e_k_f = e_k + f"_fetch{j}"
full_args = {**full_args, **_multiple_values(f.value, value_key=e_k_f)}
@ -837,7 +838,8 @@ def search_query_parts(data, error_status, errors_only, favorite_only, issue, pr
apply = True
elif f.type == schemas.FetchFilterType._status_code:
event_where.append(
_multiple_conditions(f"main.status_code {f.operator} %({e_k_f})s", f.value, value_key=e_k_f))
_multiple_conditions(f"main.status_code {f.operator} %({e_k_f})s", f.value,
value_key=e_k_f))
apply = True
elif f.type == schemas.FetchFilterType._method:
event_where.append(