From f3df9283db18103c23ae19a9ea6a3ec2d93ced65 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 12 Jan 2022 10:11:44 +0000 Subject: [PATCH] Add minimum check to Agora autoprice --- handler/agora.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handler/agora.py b/handler/agora.py index b8c788e..ace4001 100644 --- a/handler/agora.py +++ b/handler/agora.py @@ -325,6 +325,8 @@ class Agora(object): next_max = float(ads[competitor_index][3]) our_max_adjusted = next_max - 0.01 + if our_max_adjusted < float(settings.Agora.MinMargin): + our_max_adjusted = float(settings.Agora.MinMargin) if our_max_adjusted > float(settings.Agora.MaxMargin): our_max_adjusted = float(settings.Agora.MaxMargin) # Lowball next competitor