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

Fix item removal ovewriting updates in database cache #259

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

soininen
Copy link
Collaborator

@soininen soininen commented Aug 17, 2023

We call cascade_remove_items() from Toolbox without supplying db cache apparently to ensure that all cascading ids get cached in cascading_ids(). The call to make_cache(), however, overwrote all existing items in the cache destroying pending updates. We now supply a new parameter, keep_existing, to make_cache() to prevent overwriting existing items.

Fixes spine-tools/Spine-Toolbox#2259

Checklist before merging

  • Documentation (also in Toolbox repo) is up-to-date
  • Release notes in Toolbox repo have been updated
  • Unit tests have been added/updated accordingly
  • Code has been formatted by black
  • Unit tests pass

We call cascade_remove_items() from Toolbox without supplying db cache
apparently to ensure that all cascading ids get cached in cascading_ids().
The call to make_cache(), however, overwrote all existing items in
the cache destroying pending updates. We now supply a new parameter,
keep_existing, to make_cache() to prevent overwriting existing items.

Re spine-tools/Spine-Toolbox#2259
@soininen soininen merged commit bd337e8 into master Aug 17, 2023
@soininen soininen deleted the toolbox_2259_fix_remove_items_overwriting_cache branch August 17, 2023 12:22
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.

DB editor showing wrong values after committing
1 participant