upgrade organization_dao to sqlalchemy 2.0

This commit is contained in:
Kenneth Kehl
2024-10-14 07:55:43 -07:00
parent 9174efe535
commit fe85970a86

View File

@@ -15,7 +15,7 @@ def dao_get_organizations():
def dao_count_organizations_with_live_services():
stmt = (
select(func.count(Organization.id))
select(func.count(Organization.id).distinct()).select_from(Organization)
.join(Organization.services)
.filter(
Service.active.is_(True),