Add minimum check to Agora autoprice

This commit is contained in:
Mark Veidemanis 2022-01-12 10:11:44 +00:00
parent fb0b5eab5d
commit eae7ec6539
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 0 deletions

View File

@ -325,6 +325,8 @@ class Agora(object):
next_max = float(ads[competitor_index][3]) next_max = float(ads[competitor_index][3])
our_max_adjusted = next_max - 0.01 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): if our_max_adjusted > float(settings.Agora.MaxMargin):
our_max_adjusted = float(settings.Agora.MaxMargin) our_max_adjusted = float(settings.Agora.MaxMargin)
# Lowball next competitor # Lowball next competitor