From 1895319e1780ab87f5e7a67e3061f3c49879dd1c Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 11 Jan 2022 21:22:16 +0000 Subject: [PATCH] Fix cheating logic --- handler/agora.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handler/agora.py b/handler/agora.py index 9f6f0b3..32ca95a 100644 --- a/handler/agora.py +++ b/handler/agora.py @@ -305,8 +305,9 @@ class Agora(object): in order to gain the most profits and sales. """ ads, place = self.sort_ads_annotate_place(ads) + all_results_us = all([ad[1] == settings.Agora.Username for ad in ads]) if place == 0: - if len(ads) > 1: + if len(ads) > 1 and not all_results_us: competitor_index = None for index, ad in enumerate(ads): if ad[1] != settings.Agora.Username: