Dedupe campaign source IDs with gid.NewSet
Remove local uniqueGIDs helper in favor of the existing gid set utility used elsewhere in coredata. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
@@ -159,11 +159,11 @@ func (sources *AccessReviewCampaignSources) MergeByCampaignID(
|
||||
campaignID gid.GID,
|
||||
accessReviewSourceIDs []gid.GID,
|
||||
) error {
|
||||
uniqueSourceIDs := uniqueGIDs(accessReviewSourceIDs)
|
||||
sourceIDs := gid.NewSet(accessReviewSourceIDs...)
|
||||
|
||||
sourceIDStrings := make([]string, len(uniqueSourceIDs))
|
||||
for i, id := range uniqueSourceIDs {
|
||||
sourceIDStrings[i] = id.String()
|
||||
sourceIDStrings := make([]string, 0, len(sourceIDs))
|
||||
for id := range sourceIDs {
|
||||
sourceIDStrings = append(sourceIDStrings, id.String())
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
|
||||
Reference in New Issue
Block a user