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

DB Editor gives successful message when adding data has failed to to a locked DB #2201

Closed
DillonJ opened this issue Jul 23, 2023 · 2 comments · Fixed by #2260
Closed

DB Editor gives successful message when adding data has failed to to a locked DB #2201

DillonJ opened this issue Jul 23, 2023 · 2 comments · Fixed by #2260
Assignees
Labels
bug Something isn't working DB editor
Milestone

Comments

@DillonJ
Copy link
Contributor

DillonJ commented Jul 23, 2023

When adding data, such as adding new relationships when the DB is locked, DB Editor reports the operation as successful via a message in the bottom corner, but a traceback in the console indicates the operation has failed and the data is not changed in the DB and can't be comitted.

@DillonJ DillonJ added bug Something isn't working DB editor labels Jul 23, 2023
@jkiviluo jkiviluo added this to the V0.7 milestone Jul 27, 2023
@PiispaH PiispaH self-assigned this Jul 31, 2023
PiispaH pushed a commit to spine-tools/Spine-Database-API that referenced this issue Aug 17, 2023
In a locked db if existing values are updated, the changes
are stored in the cache and can be committed when the db is
no longer locked. Removing items also works the same way.
Adding items to a locked db is denied and will result in
an error. If trying to commit changes in the db while it
is locked an error telling the commit failed pops up. When
the lock is resolved the changes can again be committed.

Re spine-tools/Spine-Toolbox#2201
PiispaH pushed a commit that referenced this issue Aug 17, 2023
In a locked db if existing values are updated, the changes
are stored in the cache and can be committed when the db is
no longer locked. Removing items also works the same way.
Adding items to a locked db is denied and will result in
an error. If trying to commit changes in the db while it
is locked an error telling the commit failed pops up. When
the lock is resolved the changes can again be committed.

Re #2201
PiispaH pushed a commit that referenced this issue Aug 18, 2023
When a locked db failed to commit the listener would still be deleted, leading to weird behaviour in the db editor.

Re #2201
PiispaH pushed a commit that referenced this issue Aug 18, 2023
@PiispaH
Copy link
Collaborator

PiispaH commented Aug 18, 2023

@DillonJ @jkiviluo @manuelma if any of you have time, could you check out the above linked pull requests to check that I didn't accidentally break some obvious functionality in the db editor that the unit tests or my rudimentary testing don't catch. Just so nothing catastrophic gets into 0.7.

Both branches need to be checked out, the one in spine-toolbox and also in spinedb-api.

@jkiviluo
Copy link
Member

I haven't had any issues while using that branch (not extensively). I think it could be merged.

PiispaH pushed a commit to spine-tools/Spine-Database-API that referenced this issue Aug 30, 2023
Reimplement the fix on 0.8-dev branch.

Re spine-tools/Spine-Toolbox#2201
PiispaH pushed a commit that referenced this issue Aug 30, 2023
Reimplement the fix on 0.8-dev branch.

Re #2201
PiispaH pushed a commit that referenced this issue Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DB editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants