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

Alternative tree does not get updated after external source adds more alternatives #2353

Closed
soininen opened this issue Oct 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@soininen
Copy link
Contributor

I have a project where an Importer imports alternatives to a database. The imported alternatives do not appear immediately in the Database editor if the item is executed while Database editor is open. I think we may have forgotten to call refresh on the tree after external update.

@soininen soininen added the bug Something isn't working label Oct 17, 2023
@soininen soininen added this to the v0.8.0 milestone Oct 17, 2023
@soininen soininen self-assigned this Oct 17, 2023
soininen added a commit to spine-tools/Spine-Database-API that referenced this issue Oct 19, 2023
soininen added a commit that referenced this issue Oct 19, 2023
This ensures that db mapping clears completed queries and is thus
able to fetch items added by external source.

Re #2353
soininen added a commit that referenced this issue Oct 19, 2023
SpineDBWorker._do_fetch_more() now checks if database has commits from
unknown source before bailing out after iterating the db mapping.
This fixes cases where
1. fetch parent has fetched some data already, e.g. the Base alternative
2. an external source adds more data to the database, e.g. Importer brings
   new alternatives
3. fetch parent never fetches the new items since db worker would bail out
   after iterating the mapping

Re #2353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant