Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete task bundle on save if no tasks and on_conflict=overwrite #374

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

derethil
Copy link
Contributor

@derethil derethil commented Oct 25, 2024

Currently, the save_task_bundle function does not delete the previous bundle if there are no tasks to save. This led to an issue where I expected no bundles to load on startup, and instead, bundles from old sessions were loaded when the last session had no tasks to save.

This PR introduces a check to see if on_conflict is set to override (This made the most sense to me but but a new configuration option works too). If so, it calls delete_task_bundle when it detects that there are no tasks to save.

@github-actions github-actions bot requested a review from stevearc October 25, 2024 21:01
@stevearc
Copy link
Owner

LGTM, thanks for the PR!

@stevearc stevearc merged commit c416be5 into stevearc:master Oct 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants