From 6f6f8e68f99643c11d1a1d74f4677342b66cde97 Mon Sep 17 00:00:00 2001 From: Scott Kay Date: Thu, 21 Nov 2024 15:12:21 -0500 Subject: [PATCH] simplified MediaTypePriceGranularity access --- endpoints/openrtb2/auction.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/endpoints/openrtb2/auction.go b/endpoints/openrtb2/auction.go index 954884a5a7d..e4faa7e9cb8 100644 --- a/endpoints/openrtb2/auction.go +++ b/endpoints/openrtb2/auction.go @@ -1142,19 +1142,19 @@ func validateTargeting(t *openrtb_ext.ExtRequestTargeting) error { } } - if mediaPriceGranularity := t.MediaTypePriceGranularity; mediaPriceGranularity != nil { - if mediaPriceGranularity.Video != nil { - if err := validatePriceGranularity(mediaPriceGranularity.Video); err != nil { + if t.MediaTypePriceGranularity != nil { + if t.MediaTypePriceGranularity.Video != nil { + if err := validatePriceGranularity(t.MediaTypePriceGranularity.Video); err != nil { return err } } if t.MediaTypePriceGranularity.Banner != nil { - if err := validatePriceGranularity(mediaPriceGranularity.Banner); err != nil { + if err := validatePriceGranularity(t.MediaTypePriceGranularity.Banner); err != nil { return err } } - if mediaPriceGranularity.Native != nil { - if err := validatePriceGranularity(mediaPriceGranularity.Native); err != nil { + if t.MediaTypePriceGranularity.Native != nil { + if err := validatePriceGranularity(t.MediaTypePriceGranularity.Native); err != nil { return err } }