upgrade organization_dao to sqlalchemy 2.0

This commit is contained in:
Kenneth Kehl
2024-10-14 08:14:12 -07:00
parent ca365858bb
commit eac1122dae

View File

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