From de03b8441bf6da6437bc4df42875c3cb33103b3e Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Mon, 13 Aug 2012 12:42:56 -0400 Subject: Update extra specs calls to use deleted: False. Updates the instance type extra specs and volume type extra specs create/update functions so that 'deleted' is treated as a boolean. This resolves issues when trying to create/update extra specs on Postgres. Fixes LP Bug #1036287. Change-Id: I7f38b40122240af3254d8a817f5144ce9fafd6db --- nova/db/sqlalchemy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index c54388f07..007429a59 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -4464,7 +4464,7 @@ def instance_type_extra_specs_update_or_create(context, flavor_id, spec_ref = models.InstanceTypeExtraSpecs() spec_ref.update({"key": key, "value": value, "instance_type_id": instance_type["id"], - "deleted": 0}) + "deleted": False}) spec_ref.save(session=session) return specs @@ -4645,7 +4645,7 @@ def volume_type_extra_specs_update_or_create(context, volume_type_id, spec_ref = models.VolumeTypeExtraSpecs() spec_ref.update({"key": key, "value": value, "volume_type_id": volume_type_id, - "deleted": 0}) + "deleted": False}) spec_ref.save(session=session) return specs -- cgit