Fix for field type error

The data type of QuotaUsage.deleted is boolean, here assigned an
integer to a boolean. Not good to assume 0 is the same as False.

Similar sentence such as 'VolumeTypeProjects.deleted == 0' is correct
because the type of VolumeTypeProjects.deleted is integer.

Change-Id: Ia3f62c93dc2621474907906aeda0ddf1469d5c8f
Signed-off-by: Liang Fang <liang.a.fang@intel.com>
This commit is contained in:
Liang Fang 2018-10-14 09:36:31 -07:00
parent 65d1e2bddc
commit e468e97ab9
1 changed files with 1 additions and 1 deletions

View File

@ -671,7 +671,7 @@ class Reservation(BASE, CinderBase):
"QuotaUsage",
foreign_keys=usage_id,
primaryjoin='and_(Reservation.usage_id == QuotaUsage.id,'
'QuotaUsage.deleted == 0)')
'QuotaUsage.deleted == False)')
quota = relationship(
"Quota",
foreign_keys=allocated_id,