Fix migration 015 downgrade with sqlite.
This adds a list() call around the select sqlalchemy to pull the list of locations that start with swift. The list() call forces the select query to finish, before we try to update the database. Change-Id: I63f2e184a49e8bbd7115dd59d644506ea4069558
This commit is contained in:
parent
6a91505175
commit
8e9da71011
|
@ -50,8 +50,8 @@ def migrate_location_credentials(migrate_engine, to_quoted):
|
|||
|
||||
images_table = sqlalchemy.Table('images', meta, autoload=True)
|
||||
|
||||
images = images_table.select(images_table.c.location.startswith('swift'))\
|
||||
.execute()
|
||||
images = list(images_table.select(images_table.c.location.startswith(
|
||||
'swift')).execute())
|
||||
|
||||
for image in images:
|
||||
fixed_uri = fix_uri_credentials(image['location'], to_quoted)
|
||||
|
|
Loading…
Reference in New Issue