From f95533cd7317d38af840b015cc2ed34845979071 Mon Sep 17 00:00:00 2001 From: saurabh-narkhede Date: Fri, 3 Nov 2023 06:54:13 +0000 Subject: [PATCH] address review comment --- modules/pubmatic/openwrap/beforevalidationhook.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/pubmatic/openwrap/beforevalidationhook.go b/modules/pubmatic/openwrap/beforevalidationhook.go index f272b47fc0e..e84efafac7f 100644 --- a/modules/pubmatic/openwrap/beforevalidationhook.go +++ b/modules/pubmatic/openwrap/beforevalidationhook.go @@ -852,15 +852,13 @@ func getPubID(bidRequest openrtb2.BidRequest) (pubID int, err error) { func getTagID(imp openrtb2.Imp, impExt *models.ImpExtension) string { //priority for tagId is imp.ext.gpid > imp.TagID > imp.ext.data.pbadslot - tagId := imp.TagID - if imp.TagID == "" { - tagId = impExt.Data.PbAdslot - } if impExt.Gpid != "" { - tagId = impExt.Gpid if idx := strings.Index(impExt.Gpid, "#"); idx != -1 { - tagId = impExt.Gpid[:idx] + return impExt.Gpid[:idx] } + return impExt.Gpid + } else if imp.TagID != "" { + return imp.TagID } - return tagId + return impExt.Data.PbAdslot }