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

Fix delete difficulty flow not actually deleting the difficulty from realm #24067

Merged
merged 2 commits into from
Jun 28, 2023

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Jun 27, 2023

As alluded to in #24060 (comment)

Mind you, as stated there, I don't really see how this can be related to the corruption users are seeing in #24034 et al., but it is one possible case wherein a beatmap could get detached from its set in realm.

@bdach bdach added the realm deals with local realm database label Jun 27, 2023
Comment on lines +342 to +343
r.Remove(beatmapInfo.Metadata);
r.Remove(beatmapInfo);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notably, this same thing already shows up in a few places:

realm.Remove(beatmap.Metadata);
realm.Remove(beatmap);

realm.Remove(beatmap.Metadata);
realm.Remove(beatmap);

but I'm not super sure two lines are worth splitting a helper for. Can do if that's considered better.

@peppy peppy merged commit bc26d52 into ppy:master Jun 28, 2023
@bdach bdach deleted the fix-difficulties-not-deleting-from-db branch June 28, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
realm deals with local realm database size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants