mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-06 18:08:25 -04:00
noqa the x == False for sqlalchemy
This commit is contained in:
@@ -3,7 +3,7 @@ from sqlalchemy import delete, select
|
|||||||
from app import db
|
from app import db
|
||||||
from app.dao import DAOClass
|
from app.dao import DAOClass
|
||||||
from app.enums import PermissionType
|
from app.enums import PermissionType
|
||||||
from app.models import Permission
|
from app.models import Permission, Service
|
||||||
|
|
||||||
|
|
||||||
class PermissionDAO(DAOClass):
|
class PermissionDAO(DAOClass):
|
||||||
@@ -56,8 +56,9 @@ class PermissionDAO(DAOClass):
|
|||||||
db.session.execute(
|
db.session.execute(
|
||||||
select(self.Meta.model)
|
select(self.Meta.model)
|
||||||
.where(self.Meta.model.user_id == user_id)
|
.where(self.Meta.model.user_id == user_id)
|
||||||
.join(Permission.service)
|
.join(Permission)
|
||||||
.where(Permission.service.active == True) # noqa
|
.join(Service, Permission.service_id == Service.id)
|
||||||
|
.where(Service.active == True) # noqa
|
||||||
)
|
)
|
||||||
.scalars()
|
.scalars()
|
||||||
.all()
|
.all()
|
||||||
|
|||||||
Reference in New Issue
Block a user