fix: handle between condition properly in get_link_to_report filters

This commit is contained in:
khushi8112 2025-11-06 00:12:01 +05:30
parent 79a2457f84
commit d7106649ee

View file

@ -1936,10 +1936,23 @@ def get_link_to_report(
conditions = []
for k, v in filters.items():
if isinstance(v, list):
conditions.extend(
str(k) + "=" + '["' + str(value[0] + '"' + "," + '"' + str(value[1]) + '"]')
for value in v
)
for value in v:
if value[0] == "between":
conditions.append(
str(k)
+ "="
+ '["'
+ str(value[0])
+ '",["'
+ str(value[1][0])
+ '","'
+ str(value[1][1])
+ '"]]'
)
else:
conditions.append(
str(k) + "=" + '["' + str(value[0] + '"' + "," + '"' + str(value[1]) + '"]')
)
else:
conditions.append(str(k) + "=" + quote(str(v)))