Fixes glance-manage exporting meta definitions issue
While using glance-manage db_export_metadefs the command fails with NoSuchColumnError for column 'name'. The issue is with calling function _export_data_to_file populating the values for resource_type_associations. This resource_type_associations expect one of the fields as 'name' whereas the function call _get_resource_type is returning an 'id'. Modified the _get_resource_type method to return whole resource type object. Change-Id: I1fb3f8eb60fec354d4897debd9034bf61d1a57b4 Closes-Bug: #1434237
This commit is contained in:
parent
f84e49db5a
commit
fe7ef09b38
|
@ -91,9 +91,8 @@ def _get_resource_type_id(meta, name):
|
|||
def _get_resource_type(meta, resource_type_id):
|
||||
rt_table = get_metadef_resource_types_table(meta)
|
||||
return (
|
||||
select([rt_table.c.id]).
|
||||
rt_table.select().
|
||||
where(rt_table.c.id == resource_type_id).
|
||||
select_from(rt_table).
|
||||
execute().fetchone())
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue