Skip to content

Commit

Permalink
Fix ext parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickloughrey committed Jun 11, 2024
1 parent f76615a commit 5831b00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adapters/triplelift_native/triplelift_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func processImp(imp *openrtb2.Imp, req *openrtb2.BidRequest) error {
// get the triplelift extension
var ext adapters.ExtImpBidder
var tlext openrtb_ext.ExtImpTriplelift

if err := json.Unmarshal(imp.Ext, &ext); err != nil {
return err
}
Expand All @@ -56,8 +57,7 @@ func processImp(imp *openrtb2.Imp, req *openrtb2.BidRequest) error {
if req.Site != nil {
siteCopy := *req.Site
if siteCopy.Domain == "msn.com" {
data := *tlext.Data
imp.TagID = data.TagCode
imp.TagID = tlext.TagCode
} else {
imp.TagID = tlext.InvCode
}
Expand Down Expand Up @@ -99,7 +99,7 @@ func (a *TripleliftNativeAdapter) MakeRequests(request *openrtb2.BidRequest, ext
var validImps []openrtb2.Imp
// pre-process the imps
for _, imp := range tlRequest.Imp {
if err := processImp(&imp, tlRequest); err == nil {
if err := processImp(&imp, request); err == nil {
validImps = append(validImps, imp)
} else {
errs = append(errs, err)
Expand Down

0 comments on commit 5831b00

Please sign in to comment.