mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 11:04:02 +03:00
This commit is contained in:
parent
5009aeff18
commit
2b6245db53
|
@ -27,7 +27,7 @@ class CreateModelMixin(object):
|
|||
|
||||
def get_success_headers(self, data):
|
||||
try:
|
||||
return {'Location': data[api_settings.URL_FIELD_NAME]}
|
||||
return {'Location': str(data[api_settings.URL_FIELD_NAME])}
|
||||
except (TypeError, KeyError):
|
||||
return {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user