This repository was archived by the owner on Jan 31, 2018. It is now read-only.
[bug 933786] Fix strip error#213
Merged
willkg merged 1 commit intomozilla:masterfrom Feb 11, 2014
willkg:933786-fix-device-strip
Merged
[bug 933786] Fix strip error#213willkg merged 1 commit intomozilla:masterfrom willkg:933786-fix-device-strip
willkg merged 1 commit intomozilla:masterfrom
willkg:933786-fix-device-strip
Conversation
Member
Author
|
I'm totally game for other ideas here. |
Contributor
|
This branch fixes the issue for me r+ |
DRF allows nulls as valid values for CharField. This creates NoNullsCharField which restores sanity to the world. This fixes the strip error by raising a ValidationError which will send an error to the client rather than letting the value through and having it throw an AttributeError where it shouldn't be.
Member
Author
|
^^^ That redoes the fix with a much better fix that prevents nulls for all the fields. r? |
Contributor
r+! |
Member
Author
|
2324aa3 [bug 933786] Fix strip error |
This file contains hidden or 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
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.
We get this weird error on input-stage (and only on stage) where someone
is using the Input API and sending in nonsensical POST data and it
somehow manages to result in attrs['device'] being None which causes an
error.
I spent some time looking into it and I can't figure out how it ends up
as a None. I don't know what the actual input that's causing the error
is.
Regardless, this alleviates that by making sure it's a unicode but it's
goofipants.
r?