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

A missing framerate entry causes submission to break (and also breaks all pages trying to show submission) #1539

Open
Masterjun3 opened this issue Mar 31, 2023 · 2 comments

Comments

@Masterjun3
Copy link
Collaborator

When a submission is created, (and our parser doesn't override the framerate) we match the framerate exactly to the system and region.

// SingleOrDefault should work here because the only time there could be more than one for a system and region are formats that return a framerate override
// Those systems should never hit this code block. But just in case.
submission.SystemFrameRate = await _db.GameSystemFrameRates
.ForSystem(submission.System.Id)
.ForRegion(parseResult.Region.ToString().ToUpper())
.FirstOrDefaultAsync();

If this doesn't exist, the field is empty and breaks the title generation.


To avoid breaking the site, we have to either set a default framerate if the framerate wasn't found, or we have to make sure that fitting framerate entries are always created when creating a new system.

@vadosnaprimer
Copy link
Collaborator

I can't remember why we didn't have a suitable framerate in that case. What submission was it?

@Masterjun3
Copy link
Collaborator Author

Masterjun3 commented Feb 2, 2024

I think the region was set to "World" without a framerateoverride, but we only had "NTSC" and "PAL" regions, or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants