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 issue when readding a committed, then removed item #408

Closed soininen closed 4 months ago

soininen commented 4 months ago

This PR fixes a bug where a committed item would disappear from the DB if it was removed, then readded (as new item, not via restore()).

Fixes spine-tools/Spine-Toolbox#2743

Checklist before merging

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 89.65517% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 78.16%. Comparing base (02807aa) to head (c7ed0a3).

Files Patch % Lines
spinedb_api/db_mapping.py 81.81% 1 Missing and 1 partial :warning:
spinedb_api/db_mapping_base.py 94.44% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #408 +/- ## ========================================== - Coverage 78.28% 78.16% -0.13% ========================================== Files 76 72 -4 Lines 9543 9515 -28 Branches 2025 2031 +6 ========================================== - Hits 7471 7437 -34 - Misses 1737 1740 +3 - Partials 335 338 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.