diff options
| author | Tom Christie | 2013-03-10 13:34:02 -0700 |
|---|---|---|
| committer | Tom Christie | 2013-03-10 13:34:02 -0700 |
| commit | 99b18d7485ebe0ab7f89ae634298d771b1c66dce (patch) | |
| tree | cf57e7e2825adcff183c90d25469c8a04303d593 /rest_framework/relations.py | |
| parent | 239758e034a9418aac3be1bab992679babc461e6 (diff) | |
| parent | 126a0f739ddb19ab2525618539b526d02330dbd5 (diff) | |
| download | django-rest-framework-99b18d7485ebe0ab7f89ae634298d771b1c66dce.tar.bz2 | |
Merge pull request #722 from Bouke/patch-1
PrimaryKeyRelatedField with OneToOneField serializes wrong object's id
Diffstat (limited to 'rest_framework/relations.py')
| -rw-r--r-- | rest_framework/relations.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 0c108717..2a10e9af 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -235,7 +235,6 @@ class PrimaryKeyRelatedField(RelatedField): pk = getattr(obj, self.source or field_name).pk except ObjectDoesNotExist: return None - return self.to_native(obj.pk) # Forward relationship return self.to_native(pk) |
