Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion taiga/projects/services/bulk_update_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ def update_order_and_swimlane(swimlane_to_be_deleted, move_to_swimlane):
new_indexes = range(0, len(ordered_uss_ids))
data = list(zip(ordered_swimlane_ids, ordered_uss_ids, new_indexes))

if not data:
return

with connection.cursor() as curs:
execute_values(curs,
"""
Expand All @@ -295,4 +298,5 @@ def update_order_and_swimlane(swimlane_to_be_deleted, move_to_swimlane):
swimlane_id = tmp.sid
FROM (VALUES %s) AS tmp (sid, ussid, new_order)
WHERE tmp.ussid = userstories_userstory.id""",
data)
data,
template="(%s::integer, %s::integer, %s::integer)")