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

Pass revision directly #2756

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Pass revision directly #2756

merged 1 commit into from
Feb 27, 2025

Conversation

erri120
Copy link
Member

@erri120 erri120 commented Feb 27, 2025

Doesn't do a lookup anymore and just passes the revision directly, fixes #2749.

The bug was caused because we'd observe all revisions and create cards out of them, the cards constructor would get passed an ID and do a lookup for the revision using LINQ First() which throws an exception if there are no items in the source enumerable. This can happen if the collection gets deleted, which sends the user to the library and then there's probably a race condition where the revision gets deleted while we try to create the collection card.

With this PR we won't get an exception, the card will disappear immediately.

Doesn't do a lookup, fixes Nexus-Mods#2749.
@erri120 erri120 requested a review from a team February 27, 2025 11:47
@erri120 erri120 self-assigned this Feb 27, 2025
@Al12rs
Copy link
Contributor

Al12rs commented Feb 27, 2025

Didn't test, but the code should do as advertised

@erri120 erri120 merged commit 636e899 into Nexus-Mods:main Feb 27, 2025
10 checks passed
@erri120 erri120 deleted the fix/2749 branch February 27, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

App consistently crashes when using "Remove collection revision"
2 participants