Fixing bulk update API call with empty arrays
parent
7754d315f0
commit
f502b7e243
|
@ -130,6 +130,9 @@ def update_attr_in_bulk_for_ids(values, attr, model):
|
||||||
:params attr: attr to update
|
:params attr: attr to update
|
||||||
:params model: Model of the ids.
|
:params model: Model of the ids.
|
||||||
"""
|
"""
|
||||||
|
if not values:
|
||||||
|
return
|
||||||
|
|
||||||
values = [str((id, order)) for id, order in values.items()]
|
values = [str((id, order)) for id, order in values.items()]
|
||||||
sql = """
|
sql = """
|
||||||
UPDATE "{tbl}"
|
UPDATE "{tbl}"
|
||||||
|
|
Loading…
Reference in New Issue