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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user