fix bad slash migration
we're incorrectly looking at the column when debating whether to reencode a resource. Closes-Bug: #1662990 Change-Id: I84a78139ca6e5e049f70fd9c84033e60bc13e035
This commit is contained in:
parent
1ce684f4e0
commit
f186f89a4b
|
@ -103,17 +103,16 @@ def upgrade():
|
|||
|
||||
for resource in connection.execute(resource_table.select()):
|
||||
|
||||
if resource_table.c.original_resource_id is None:
|
||||
if resource.original_resource_id is None:
|
||||
# statsd resource has no original_resource_id and is NULL
|
||||
continue
|
||||
|
||||
try:
|
||||
orig_as_uuid = uuid.UUID(
|
||||
str(resource_table.c.original_resource_id))
|
||||
orig_as_uuid = uuid.UUID(str(resource.original_resource_id))
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
if orig_as_uuid == resource_table.c.id:
|
||||
if orig_as_uuid == resource.id:
|
||||
continue
|
||||
|
||||
new_original_resource_id = resource.original_resource_id.replace(
|
||||
|
|
Loading…
Reference in New Issue