mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
upgrade organization_dao to sqlalchemy 2.0
This commit is contained in:
@@ -15,7 +15,7 @@ def dao_get_organizations():
|
|||||||
|
|
||||||
def dao_count_organizations_with_live_services():
|
def dao_count_organizations_with_live_services():
|
||||||
stmt = (
|
stmt = (
|
||||||
select(func.count(Organization.id))
|
select(func.count(Organization.id).distinct()).select_from(Organization)
|
||||||
.join(Organization.services)
|
.join(Organization.services)
|
||||||
.filter(
|
.filter(
|
||||||
Service.active.is_(True),
|
Service.active.is_(True),
|
||||||
|
|||||||
Reference in New Issue
Block a user