Use filtered entry count for campaign close
Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
committed by
Bryan Frimin
parent
9c09562918
commit
3880a09cea
@@ -370,8 +370,17 @@ func (s *Service) CloseCampaign(
|
||||
}
|
||||
|
||||
entries := coredata.AccessReviewEntries{}
|
||||
filter := &coredata.AccessReviewEntryFilter{
|
||||
Decision: new(coredata.AccessReviewEntryDecisionPending),
|
||||
}
|
||||
|
||||
pendingCount, err := entries.CountPendingByCampaignID(ctx, conn, scope, campaignID)
|
||||
pendingCount, err := entries.CountByCampaignID(
|
||||
ctx,
|
||||
conn,
|
||||
scope,
|
||||
campaignID,
|
||||
filter,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot count pending entries: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user