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

Accept the empty string as a falsy value for build_number in list_releases #1531

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gabrielBusta
Copy link
Member

Fixes #1530

@gabrielBusta gabrielBusta added the bug Something isn't working label Jul 22, 2024
@gabrielBusta gabrielBusta requested a review from a team July 22, 2024 22:08
Copy link
Contributor

@gbrownmozilla gbrownmozilla left a comment

Choose a reason for hiding this comment

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

I'm not sure I understand the issue, but this seems worth trying.

Copy link
Contributor

@jcristau jcristau left a comment

Choose a reason for hiding this comment

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

This feels like it should be fixed in the frontend, to not send a null value...

@@ -40,7 +42,7 @@ def list_releases(product=None, branch=None, version=None, build_number=None, st
if version:
releases = releases.filter(Release.version == version)
if build_number:
releases = releases.filter(Release.build_number == build_number)
releases = releases.filter(Release.build_number == int(build_number))
Copy link
Contributor

Choose a reason for hiding this comment

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

If build_number is not an int this will raise ValueError and presumably turn into a 500, which we don't want.

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 this pull request may close these issues.

Permanent 400/white screen crash blocking the creation of Thunderbird releases
3 participants