Skip to content

Commit

Permalink
OTT-216: add all SupportDeal features (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pubmatic-Dhruv-Sonone authored and pm-nilesh-chate committed Jan 12, 2022
1 parent 18488ea commit da74169
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions exchange/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,8 @@ func applyCategoryMapping(ctx context.Context, requestExt *openrtb_ext.ExtReques
categoryDuration = fmt.Sprintf("%s_%s", categoryDuration, bidderName.String())
}

if dupe, ok := dedupe[dupeKey]; ok {
if !brandCatExt.SkipDedup {
if dupe, ok := dedupe[dupeKey]; ok {

dupeBidPrice, err := strconv.ParseFloat(dupe.bidPrice, 64)
if err != nil {
Expand All @@ -798,7 +799,6 @@ func applyCategoryMapping(ctx context.Context, requestExt *openrtb_ext.ExtReques
} else {
currBidPrice = -1
}
}

if dupeBidPrice < currBidPrice {
if dupe.bidderName == bidderName {
Expand Down Expand Up @@ -830,7 +830,6 @@ func applyCategoryMapping(ctx context.Context, requestExt *openrtb_ext.ExtReques
dedupe[dupeKey] = bidDedupe{bidderName: bidderName, bidIndex: bidInd, bidID: bidID, bidPrice: pb}
}
res[bidID] = categoryDuration
dedupe[dupeKey] = bidDedupe{bidderName: bidderName, bidIndex: bidInd, bidID: bidID, bidPrice: pb}
}

if len(bidsToRemove) > 0 {
Expand Down

0 comments on commit da74169

Please sign in to comment.