Merge "Switch to using bool for filtering non-deleted volume attributes"
This commit is contained in:
commit
0efc1b3005
@ -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))
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user