From 988251b0e5c0ae37bb4cfdf4745bbe0710521b0c Mon Sep 17 00:00:00 2001 From: Sam Morrison Date: Wed, 3 Jun 2020 10:11:16 +1000 Subject: [PATCH] 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 (cherry picked from commit cd27f95c0bc9bc8941cb6982c788b214253e23ee) --- murano/api/versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/murano/api/versions.py b/murano/api/versions.py index f3e5efaf0..3a47e3974 100644 --- a/murano/api/versions.py +++ b/murano/api/versions.py @@ -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)