diff --git a/dooit/api/hooks/fix_hooks.py b/dooit/api/hooks/fix_hooks.py index 28f29e13..b4d9a687 100644 --- a/dooit/api/hooks/fix_hooks.py +++ b/dooit/api/hooks/fix_hooks.py @@ -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 """), @@ -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 """),