Use '_prepare_json_response' to serialize list response

Change-Id: I79b6dcbba387e2ee1f133873469ecfb2eea70326
This commit is contained in:
Mike Fedosin 2017-08-27 18:25:49 +03:00
parent 1281a8b4db
commit 8212ea423b
1 changed files with 2 additions and 3 deletions

View File

@ -549,9 +549,8 @@ class ResponseSerializer(api_versioning.VersionedResource,
params['marker'] = af_list['next_marker']
next_query = urlparse.urlencode(params)
body['next'] = '/artifacts/%s?%s' % (type_name, next_query)
response.unicode_body = six.text_type(json.dumps(body,
ensure_ascii=False))
response.content_type = 'application/json'
self._prepare_json_response(response, body)
@supported_versions(min_ver='1.0')
def delete(self, response, result):