-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
fix: Update ROM deletion process to remove associated collections #1345
Conversation
… streamline user data updates
187da44
to
014427e
Compare
Test Results88 tests 88 ✅ 26s ⏱️ Results for commit c6039cc. ♻️ This comment has been updated with latest results. |
collection.roms = [rom_id for rom_id in collection.roms if rom_id != id] | ||
db_collection_handler.update_collection( | ||
collection.id, {"roms": collection.roms} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this instead happen in db_rom_handler.delete_rom
as a side-effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm idk, I stick to the idea of just interacting with one table per handler, but idk if that's the best approach
The current solution looks good. An improvement we can add in the future, to avoid any race conditions and make the update atomic, is to have |
No description provided.