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

500 error on collections/{namespace}/{collection} when a collection only contains pre-release versions #87

Closed
briantist opened this issue Sep 28, 2023 · 0 comments · Fixed by #88
Assignees
Labels
bug Something isn't working

Comments

@briantist
Copy link
Owner

We usually want to return the latest final version in the latest_verstion key returned by this API, so at the moment we filter out all non-final versions when we build the list, with the thought that eventually a final version will populate the field.

But in a collection where there are only pre-release versions, that field will never be populated. A different part of the code assumes it always will be populated, and crashes.

The question then is what should be in that key in that case.

I think that the logic should be that it contains the latest pre-release. If even a single final version exists, it will take precedence over any pre-release.

That seems to be supported by:

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

Successfully merging a pull request may close this issue.

1 participant