Skip to content

Comments

Avoid deleting children multiple times while purging old tasks#1254

Merged
diegogangl merged 1 commit intogetting-things-gnome:masterfrom
gycsaba96:fix-1247
Dec 22, 2025
Merged

Avoid deleting children multiple times while purging old tasks#1254
diegogangl merged 1 commit intogetting-things-gnome:masterfrom
gycsaba96:fix-1247

Conversation

@gycsaba96
Copy link
Contributor

Fixes #1247

GTG tried to delete the same closed task multiple times. E.g., the task is first deleted as the child of another closed task, and then a second delete is attempted because the task is also present in to_remove. Using BaseStore.batch_remove avoids this problem.

Use BaseStore.batch_remove to avoid deleting the same closed task
multiple times in Application.purge_old_tasks. (E.g., the task is
first deleted as the child of another closed task, and then a
second delete is attempted because the task is also present in
'to_remove').

This fixes GitHub issue getting-things-gnome#1247.
@diegogangl
Copy link
Contributor

LGTM, thanks!

@diegogangl diegogangl merged commit 2b2ecb1 into getting-things-gnome:master Dec 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyError traceback when clicking the "Purge old tasks" button (on a dataset imported from 0.6)

2 participants