diff options
| author | Tom Christie | 2014-10-03 13:12:23 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-10-03 13:12:23 +0100 |
| commit | 765b0b33bf1fa9b7c6b45d3877d10a05d4e9f6ea (patch) | |
| tree | eb945a286defe60c9e2960cbd96d764072593937 /rest_framework/relations.py | |
| parent | fec7c4b45812d22423e73ec3ab801857a55d7340 (diff) | |
| download | django-rest-framework-765b0b33bf1fa9b7c6b45d3877d10a05d4e9f6ea.tar.bz2 | |
Revert accidental stupidity
Diffstat (limited to 'rest_framework/relations.py')
| -rw-r--r-- | rest_framework/relations.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 4f971917..f9b5ff0d 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -127,7 +127,7 @@ class HyperlinkedRelatedField(RelatedField): attributes are not configured to correctly match the URL conf. """ # Unsaved objects will not yet have a valid URL. - if obj.pk: + if obj.pk is None: return None lookup_value = getattr(obj, self.lookup_field) |
