-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Addons: make it work on invalid URLs #12372
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
Conversation
# We do allow hitting this URL without a valid version. | ||
# This is the same case than sending `?url=` with a partial match | ||
# (eg. invalid URL path). | ||
version = project.versions.filter(slug=version_slug).first() |
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.
This should probably check if the version slug is empty instead. Given a wrong version and not version at all isn't the same.
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.
We aren't doing anything different if the version slug is invalid/empty when the ?url=
attribute is passed either. This matches that behavior when using ?version=
attribute.
I'm happy to discuss behaving differently in those cases if we want that, but I want to move forward with this PR here and work on that different behavior in a different one.
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.
Opened #12420
Documentation build overview
Show files changed (2 files in total): 📝 2 modified | ➕ 0 added | ➖ 0 deleted
|
Closes #12371