mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
noqa the x == False for sqlalchemy
This commit is contained in:
@@ -66,13 +66,11 @@ class PermissionDAO(DAOClass):
|
|||||||
def get_permissions_by_user_id_and_service_id(self, user_id, service_id):
|
def get_permissions_by_user_id_and_service_id(self, user_id, service_id):
|
||||||
return (
|
return (
|
||||||
db.session.execute(
|
db.session.execute(
|
||||||
select(self.Meta.model)
|
select(Permission)
|
||||||
.where(self.Meta.model.user_id == user_id)
|
.join(Service)
|
||||||
.join(Permission.service)
|
.where(Permission.user_id == user_id)
|
||||||
.where(
|
.where(Service.active.is_(True))
|
||||||
Permission.service.active == True, # noqa
|
.where(Service.id == service_id)
|
||||||
Permission.service.id == service_id,
|
|
||||||
) # noqa
|
|
||||||
)
|
)
|
||||||
.scalars()
|
.scalars()
|
||||||
.all()
|
.all()
|
||||||
|
|||||||
Reference in New Issue
Block a user