fix: handle between condition properly in get_link_to_report filters
This commit is contained in:
parent
79a2457f84
commit
d7106649ee
1 changed files with 17 additions and 4 deletions
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue