Fix undefined source in AddCampaignSource

Declare AccessReviewSource before LoadByID so the package compiles
after RemoveCampaignSource cleanup.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
Cursor Agent
2026-07-27 15:44:58 +00:00
parent b5574764cf
commit 9ad52fc27a

View File

@@ -240,6 +240,8 @@ func (s *Service) AddCampaignSource(
if campaign.Status != coredata.AccessReviewCampaignStatusDraft {
return NewCampaignNotDraftError(campaign.ID)
}
source := &coredata.AccessReviewSource{}
if err := source.LoadByID(ctx, conn, scope, req.AccessReviewSourceID); err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) {
return coredata.ErrResourceNotFound