We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea6c6bc commit 64ce376Copy full SHA for 64ce376
rest_framework_json_api/relations.py
@@ -1,3 +1,4 @@
1
+from rest_framework.exceptions import ValidationError
2
from rest_framework.relations import *
3
4
@@ -13,8 +14,9 @@ def __init__(self, **kwargs):
13
14
15
def to_internal_value(self, data):
16
try:
17
+ # Try parsing links first for the browseable API
18
return super(HyperlinkedRelatedField, self).to_internal_value(data)
- except AssertionError:
19
+ except ValidationError:
20
if self.pk_field is not None:
21
data = self.pk_field.to_internal_value(data)
22
0 commit comments