Skip to content

Commit

Permalink
fix: pending status reset on sibling addition (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Dec 19, 2024
1 parent 0add32a commit 5cda2f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dooit/api/hooks/update_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ def update_children_to_pending(_, connection, target: Todo):
if not target.pending:
return

if any(todo.pending for todo in target.todos):
return

query = update(Todo).where(Todo.parent_todo_id == target.id).values(pending=True)
connection.execute(query)

Expand Down

0 comments on commit 5cda2f8

Please sign in to comment.