Skip to content

Commit

Permalink
fix: prevent ExchangeService to empty Source object when TRANSMIT_TID…
Browse files Browse the repository at this point in the history
… is false and supplyChainResolver can't resolve a schain for bidder
  • Loading branch information
vpontesfreestar committed Dec 18, 2023
1 parent a2c3f6f commit b1430f8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/org/prebid/server/auction/ExchangeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,15 @@ private Source prepareSource(String bidder, BidRequest bidRequest, boolean trans
final Source receivedSource = bidRequest.getSource();
final SupplyChain bidderSchain = supplyChainResolver.resolveForBidder(bidder, bidRequest);

if (bidderSchain == null && transmitTid) {
return receivedSource;
if (bidderSchain == null) {

if (receivedSource == null) {
return null;
}

return receivedSource.toBuilder()
.tid(transmitTid ? receivedSource.getTid() : null)
.build();
}

return receivedSource == null
Expand Down

0 comments on commit b1430f8

Please sign in to comment.