Skip to content

Commit

Permalink
Try new structure for SQLA count
Browse files Browse the repository at this point in the history
  • Loading branch information
emdoyle committed Aug 21, 2024
1 parent c18daf3 commit 58f8cd9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/src/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ async def get_total_services_deployed_for_user(
) -> int:
async with db as session:
query = (
func.count(Service.id)
.select_from(Service)
select(func.count(Service.id))
.join(Service.deployment)
.join(Deployment.user)
.where(User.id == user.id)
Expand Down

0 comments on commit 58f8cd9

Please sign in to comment.