Merge "Switch to using bool for filtering non-deleted volume attributes"

This commit is contained in:
Jenkins 2017-08-02 18:28:53 +00:00 committed by Gerrit Code Review
commit 0efc1b3005
2 changed files with 2 additions and 3 deletions

View File

@ -3473,7 +3473,7 @@ def _process_group_types_filters(query, filters):
if filters['is_public'] and context.project_id is not None:
projects_attr = getattr(models.GroupTypes, 'projects')
the_filter.extend([
projects_attr.any(project_id=context.project_id, deleted=0)
projects_attr.any(project_id=context.project_id, deleted=False)
])
if len(the_filter) > 1:
query = query.filter(or_(*the_filter))

View File

@ -446,7 +446,6 @@ class GroupTypeProjects(BASE, CinderBase):
group_type_id = Column(String, ForeignKey('group_types.id'),
nullable=False)
project_id = Column(String(255))
deleted = Column(Integer, default=0)
group_type = relationship(
GroupTypes,
@ -454,7 +453,7 @@ class GroupTypeProjects(BASE, CinderBase):
foreign_keys=group_type_id,
primaryjoin='and_('
'GroupTypeProjects.group_type_id == GroupTypes.id,'
'GroupTypeProjects.deleted == 0)')
'GroupTypeProjects.deleted == False)')
class VolumeTypeExtraSpecs(BASE, CinderBase):