This repository has been archived by the owner on Jan 31, 2018. It is now read-only.
[bug 1129085] Infer version for Firefox Dev #479
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bah. forgot to add stuff to the admin again. |
^^^ Ok. Complete for realz this time. |
product = models.Product.objects.get(db_name=product_db_name) | ||
# So instead, we do the first test to handle the Android | ||
# case and the second test to handle the Firefox Dev and | ||
# related cases. |
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.
I think you can remove this comment and the commented out code below? Or perhaps I am confused.
Previously, we'd only infer the version if the browser from the user agent matched the product db_name. That doesn't work for Firefox Dev Edition or Firefox 64. This fixes that so that we can explicitly state which "browser" a product is. Then it'll match up, we can appropriately infer the product version from the user-agent specified browser version, and we can go home at night and feel like we did a good job at work.
^^^ That nixes the comment, the commented out code and also adds a defensive check to the if statement just in case product.browser is the empty string--we don't want to try to match that to anything. |
for db_name, browser in data: | ||
prod = orm.Product.objects.get(db_name=db_name) | ||
prod.browser = browser | ||
prod.save() |
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.
I'll need to add this to the django 1.7 pull request
☕ r+ |
willkg
added a commit
that referenced
this pull request
Feb 6, 2015
[bug 1129085] Infer version for Firefox Dev
5b5f9b9 [bug 1129085] Infer version for Firefox Dev Thank you! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, we'd only infer the version if the browser from the user
agent matched the product db_name. That doesn't work for Firefox Dev
Edition or Firefox 64.
This fixes that so that we can explicitly state which "browser" a
product is. Then it'll match up, we can appropriately infer the
product version from the user-agent specified browser version, and we
can go home at night and feel like we did a good job at work.
r?