mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Fix named db query list parameters when query ends with parameter
This commit is contained in:
parent
520fd6e063
commit
a3a7af73bd
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ class DbCursor:
|
|||
new_params[key + "__" + str(idx)] = val
|
||||
|
||||
new_names = [":" + key + "__" + str(idx) for idx in range(len(value))]
|
||||
query = re.sub(r":" + re.escape(key) + r"([)\s])", ", ".join(new_names) + r"\1", query)
|
||||
query = re.sub(r":" + re.escape(key) + r"([)\s]|$)", "(%s)%s" % (", ".join(new_names), r"\1"), query)
|
||||
else:
|
||||
new_params[key] = value
|
||||
|
||||
|
|
Loading…
Reference in a new issue