From 942fa3d7cdf74f118b3cfadaf09820bbe57211af Mon Sep 17 00:00:00 2001 From: liyingjun Date: Tue, 14 Mar 2017 10:48:38 +0800 Subject: [PATCH] Fix the return value for glance get_version The VERSIONS.get_version returned a Version object instead of a string, it will raise ValueError: Circular reference detected when json encode. This issue was introduced by commit 834722cf8af7b3471e9c7234da0bac8669025ca2 Change-Id: Ib41b2f7e77ac49911e9d5a4e129047f941bf5d24 Closes-bug: #1672291 --- openstack_dashboard/api/rest/glance.py | 2 +- openstack_dashboard/api/rest/keystone.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/api/rest/glance.py b/openstack_dashboard/api/rest/glance.py index 830b12be0f..a4475ee783 100644 --- a/openstack_dashboard/api/rest/glance.py +++ b/openstack_dashboard/api/rest/glance.py @@ -37,7 +37,7 @@ class Version(generic.View): def get(self, request): """Get active glance version. """ - return {'version': api.glance.get_version()} + return {'version': str(api.glance.get_version())} @urls.register diff --git a/openstack_dashboard/api/rest/keystone.py b/openstack_dashboard/api/rest/keystone.py index 88322d3e98..4e44d9d30e 100644 --- a/openstack_dashboard/api/rest/keystone.py +++ b/openstack_dashboard/api/rest/keystone.py @@ -33,7 +33,7 @@ class Version(generic.View): def get(self, request): """Get active keystone version. """ - return {'version': api.keystone.get_version()} + return {'version': str(api.keystone.get_version())} @urls.register