This commit is contained in:
Abdulhaq Emhemmed 2017-06-05 22:22:05 +00:00 committed by GitHub
commit 53f92883d4

View File

@ -381,7 +381,9 @@ class HyperlinkedRelatedField(RelatedField):
'Could not resolve URL for hyperlinked relationship using ' 'Could not resolve URL for hyperlinked relationship using '
'view name "%s". You may have failed to include the related ' 'view name "%s". You may have failed to include the related '
'model in your API, or incorrectly configured the ' '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): if value in ('', None):
value_string = {'': 'the empty string', None: 'None'}[value] value_string = {'': 'the empty string', None: 'None'}[value]