diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 4d3bdba1d..feb878805 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -381,7 +381,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.' ) if value in ('', None): value_string = {'': 'the empty string', None: 'None'}[value]