From 5f6cb2f1c19687ef3a40cf6988f12b25c5269193 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 2 Jan 2013 14:16:19 -0500 Subject: [PATCH] use deleted = False, not 0 for update Fixes bug #1095401 When running tempest on cinder on postgresql we get a number of errors because this call was trying to set deleted = 0. On mysql 0 == False, but on postgresql this is a type error. Change-Id: Ice85550e8138e0656c93a8a800afdbc5935e4bcc --- cinder/db/sqlalchemy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index 78033be7e..3ca8139ff 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -1486,7 +1486,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 -- 2.45.2