mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Use six.text_type for hyperlink names
This commit is contained in:
parent
99e97fa9d3
commit
b1b47036d7
|
@ -218,7 +218,7 @@ class HyperlinkedRelatedField(RelatedField):
|
||||||
return self.reverse(view_name, kwargs=kwargs, request=request, format=format)
|
return self.reverse(view_name, kwargs=kwargs, request=request, format=format)
|
||||||
|
|
||||||
def get_name(self, obj):
|
def get_name(self, obj):
|
||||||
return str(obj)
|
return six.text_type(obj)
|
||||||
|
|
||||||
def to_internal_value(self, data):
|
def to_internal_value(self, data):
|
||||||
request = self.context.get('request', None)
|
request = self.context.get('request', None)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user