mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
Fixed #720
This commit is contained in:
parent
3cd3235881
commit
126a0f739d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user