diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index 99716f6004e..991bde07065 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -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)) diff --git a/cinder/db/sqlalchemy/models.py b/cinder/db/sqlalchemy/models.py index 569b821580e..66752dc6318 100644 --- a/cinder/db/sqlalchemy/models.py +++ b/cinder/db/sqlalchemy/models.py @@ -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):