Skip to content

Commit

Permalink
fix: order index for new siblings
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Dec 6, 2024
1 parent 78be1ea commit df1a260
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dooit/api/hooks/fix_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def fix_order_id_workspace(mapper, connection, target: Workspace):
connection.execute(
text("""
UPDATE workspace
SET order_index = order_index + 1
SET order_index = order_index
WHERE order_index >= :current_index
AND id != :target_id
"""),
Expand All @@ -33,7 +33,7 @@ def fix_order_id_todo(mapper, connection, target: Todo):
connection.execute(
text("""
UPDATE todo
SET order_index = order_index + 1
SET order_index = order_index
WHERE order_index >= :current_index
AND id != :target_id
"""),
Expand Down

0 comments on commit df1a260

Please sign in to comment.