Skip to content

Commit

Permalink
pending count
Browse files Browse the repository at this point in the history
  • Loading branch information
heyitsmebev committed Jan 11, 2025
1 parent 7ef8081 commit 30dfc6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/dao/services_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import timedelta

from flask import current_app
from sqlalchemy import Float, Integer, cast, delete, select
from sqlalchemy import Float, cast, delete, select
from sqlalchemy.orm import joinedload
from sqlalchemy.sql.expression import and_, asc, case, func

Expand Down Expand Up @@ -459,7 +459,7 @@ def dao_fetch_stats_for_service_from_days(service_id, start_date, end_date):
total_substmt = (
select(
func.date_trunc("day", NotificationAllTimeView.created_at).label("day"),
cast(Job.notification_count, Integer).label("notification_count")
Job.notification_count.label("notification_count")
)
.join(
Job, NotificationAllTimeView.job_id == Job.id
Expand Down Expand Up @@ -497,7 +497,7 @@ def dao_fetch_stats_for_service_from_days(service_id, start_date, end_date):
NotificationAllTimeView.notification_type,
NotificationAllTimeView.status,
func.date_trunc("day", NotificationAllTimeView.created_at).label("day"),
cast(func.count(NotificationAllTimeView.id), Integer).label("count"),
func.count(NotificationAllTimeView.id).label("count"),
)
.where(
NotificationAllTimeView.service_id == service_id,
Expand Down

0 comments on commit 30dfc6a

Please sign in to comment.