From 4f8cf8266d0955879aeb42633225f36a44a225ef Mon Sep 17 00:00:00 2001 From: zhiyang7 Date: Wed, 5 Jan 2022 12:06:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- douzero/server/battle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/douzero/server/battle.py b/douzero/server/battle.py index df9bd0e..27cb8a7 100644 --- a/douzero/server/battle.py +++ b/douzero/server/battle.py @@ -94,7 +94,7 @@ def battle_logic(flags, baseline : Baseline, battle : Battle): battle.status = 1 if challenge_success else 2 battle.save() if not challenge_success: - cnt = Battle.select().where(Battle.status == 0).count() + cnt = Battle.select().where(Battle.challenger_path == battle.challenger_path,Battle.status == 0).count() if cnt == 0: onnx_path = str(battle.challenger_path) + '.onnx' if os.path.exists(onnx_path):