]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
use deleted = False, not 0 for update
authorSean Dague <sdague@linux.vnet.ibm.com>
Wed, 2 Jan 2013 19:16:19 +0000 (14:16 -0500)
committerSean Dague <sdague@linux.vnet.ibm.com>
Wed, 2 Jan 2013 19:16:19 +0000 (14:16 -0500)
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

index 78033be7eaa3a2905196262b9a817a79c955a3f8..3ca8139ff11585d76c27af73101f09d98e111b14 100644 (file)
@@ -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