From cfa774eecee8f1fa800e9028f2c7f52a2ae028f6 Mon Sep 17 00:00:00 2001 From: Jason Kölker Date: Fri, 10 Feb 2012 15:10:47 -0600 Subject: Force imageRef to be a string Fixes lp930409 Change-Id: Iff07a9b70210a43eb9442222e4d6cac60dd8f375 --- nova/api/openstack/compute/servers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 57adf22ae..b38a6321f 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -961,7 +961,7 @@ class Controller(wsgi.Controller): def _image_ref_from_req_data(self, data): try: - return data['server']['imageRef'] + return unicode(data['server']['imageRef']) except (TypeError, KeyError): msg = _("Missing imageRef attribute") raise exc.HTTPBadRequest(explanation=msg) -- cgit