mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
An empty value for the lookup_field corresponding to any instance will raise this error, the error message should indicate so to help debugging
This commit is contained in:
parent
b41808b79a
commit
4b77cbe709
|
@ -267,7 +267,9 @@ class HyperlinkedRelatedField(RelatedField):
|
|||
'Could not resolve URL for hyperlinked relationship using '
|
||||
'view name "%s". You may have failed to include the related '
|
||||
'model in your API, or incorrectly configured the '
|
||||
'`lookup_field` attribute on this field.'
|
||||
'`lookup_field` attribute on this field, or perhaps your'
|
||||
'data contains an empty value for the `lookup_field` you'
|
||||
'specified.'
|
||||
)
|
||||
raise ImproperlyConfigured(msg % self.view_name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user