mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(filters): max downloads include pending with postgres (#901)
fix(filters): max downloads include pending with Postgres
This commit is contained in:
parent
319bc2f200
commit
de4a6c7661
1 changed files with 1 additions and 1 deletions
|
@ -1073,7 +1073,7 @@ func (r *FilterRepo) downloadsByFilterPostgres(ctx context.Context, filterID int
|
||||||
COALESCE(SUM(CASE WHEN release_action_status.timestamp >= date_trunc('month', CURRENT_DATE) THEN 1 ELSE 0 END),0) as "month_count",
|
COALESCE(SUM(CASE WHEN release_action_status.timestamp >= date_trunc('month', CURRENT_DATE) THEN 1 ELSE 0 END),0) as "month_count",
|
||||||
count(*) as "total_count"
|
count(*) as "total_count"
|
||||||
FROM release_action_status
|
FROM release_action_status
|
||||||
WHERE release_action_status.status = 'PUSH_APPROVED' AND release_action_status.filter_id = $1;`
|
WHERE (release_action_status.status = 'PUSH_APPROVED' OR release_action_status.status = 'PENDING') AND release_action_status.filter_id = $1;`
|
||||||
|
|
||||||
row := r.db.handler.QueryRowContext(ctx, query, filterID)
|
row := r.db.handler.QueryRowContext(ctx, query, filterID)
|
||||||
if err := row.Err(); err != nil {
|
if err := row.Err(); err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue