Fix versions api by using webob correctly

Currently getting the following error:
TypeError: You cannot set Response.body to a text object (use Response.text)

Closes-Bug: #1882156

Change-Id: Iba918ec671dabb2d0df72e071c6279176c63b312
This commit is contained in:
Sam Morrison 2020-06-03 10:11:16 +10:00
parent fa90f789da
commit cd27f95c0b
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class Controller(object):
response = webob.Response(request=req,
status=http_client.MULTIPLE_CHOICES,
content_type='application/json')
response.body = jsonutils.dumps(dict(versions=version_objs))
response.text = jsonutils.dumps(dict(versions=version_objs))
return response
@webob.dec.wsgify(RequestClass=wsgi.Request)