converted 1/0 comparison in db to True/False for Postgres cast compatibility
This commit is contained in:
commit
28f41bf8bd
@ -816,17 +816,17 @@ def instance_destroy(context, instance_id):
|
|||||||
with session.begin():
|
with session.begin():
|
||||||
session.query(models.Instance).\
|
session.query(models.Instance).\
|
||||||
filter_by(id=instance_id).\
|
filter_by(id=instance_id).\
|
||||||
update({'deleted': 1,
|
update({'deleted': True,
|
||||||
'deleted_at': datetime.datetime.utcnow(),
|
'deleted_at': datetime.datetime.utcnow(),
|
||||||
'updated_at': literal_column('updated_at')})
|
'updated_at': literal_column('updated_at')})
|
||||||
session.query(models.SecurityGroupInstanceAssociation).\
|
session.query(models.SecurityGroupInstanceAssociation).\
|
||||||
filter_by(instance_id=instance_id).\
|
filter_by(instance_id=instance_id).\
|
||||||
update({'deleted': 1,
|
update({'deleted': True,
|
||||||
'deleted_at': datetime.datetime.utcnow(),
|
'deleted_at': datetime.datetime.utcnow(),
|
||||||
'updated_at': literal_column('updated_at')})
|
'updated_at': literal_column('updated_at')})
|
||||||
session.query(models.InstanceMetadata).\
|
session.query(models.InstanceMetadata).\
|
||||||
filter_by(instance_id=instance_id).\
|
filter_by(instance_id=instance_id).\
|
||||||
update({'deleted': 1,
|
update({'deleted': True,
|
||||||
'deleted_at': datetime.datetime.utcnow(),
|
'deleted_at': datetime.datetime.utcnow(),
|
||||||
'updated_at': literal_column('updated_at')})
|
'updated_at': literal_column('updated_at')})
|
||||||
|
|
||||||
@ -2513,7 +2513,7 @@ def instance_metadata_delete(context, instance_id, key):
|
|||||||
filter_by(instance_id=instance_id).\
|
filter_by(instance_id=instance_id).\
|
||||||
filter_by(key=key).\
|
filter_by(key=key).\
|
||||||
filter_by(deleted=False).\
|
filter_by(deleted=False).\
|
||||||
update({'deleted': 1,
|
update({'deleted': True,
|
||||||
'deleted_at': datetime.datetime.utcnow(),
|
'deleted_at': datetime.datetime.utcnow(),
|
||||||
'updated_at': literal_column('updated_at')})
|
'updated_at': literal_column('updated_at')})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user