spine-tools / Spine-Database-API

Database interface to Spine generic data model
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Fix item removal ovewriting updates in database cache #259

Closed soininen closed 11 months ago

soininen commented 11 months ago

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