Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Fix empty pk detection in HyperlinkRelatedField.get_url#3962
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fix empty pk detection in HyperlinkRelatedField.get_url#3962
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jpadilla commentedFeb 25, 2016
@jslang lgtm, thanks! |
tests/test_relations.py Outdated
| classTestHyperlinkedRelatedField(APISimpleTestCase): | ||
| defsetUp(self): | ||
| self.instance=MockObject(pk=1,name='foo') |
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 can get rid of thisself.instance which is not used in this test case.
125334d to186c0e3CompareThis implementation allows detection of empty values that are non-nullable, allowing the field to return None values for such cases
186c0e3 to7ac8cc7Comparexordoquy commentedFeb 29, 2016
Looks good to me too. |
Fix empty pk detection in HyperlinkRelatedField.get_url
lovelydinosaur commentedMar 4, 2016
Thanks! |
This implementation allows detection of empty values that are non-nullable, allowing the field to return
Nonevalues for such cases.Fixes#3959