From 6895220cd9d0cdce2e82690d3972b2cc6f743b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A3=E6=B8=A3=E5=92=8C?= <2608761159@qq.com> Date: Tue, 8 Oct 2024 14:07:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=9B=87=E5=BD=A2=E8=B7=91=E8=A1=A5=E4=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Exercise3/run_around.py | 1 + LSZXBackend/exercise_backend.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Exercise3/run_around.py b/Exercise3/run_around.py index e80f2af..f479115 100644 --- a/Exercise3/run_around.py +++ b/Exercise3/run_around.py @@ -56,6 +56,7 @@ class Runaround(BaseExercise): gender = "woman" if self.info.get(GENDER) == "女" else "man" # if self.costtime == '未完成': if self.costtime < 0: + self.costtime = 5 score = 0 else: score = get_fin_score.Military(gender, int(age), diff --git a/LSZXBackend/exercise_backend.py b/LSZXBackend/exercise_backend.py index 42fcc37..1963fea 100644 --- a/LSZXBackend/exercise_backend.py +++ b/LSZXBackend/exercise_backend.py @@ -590,10 +590,10 @@ class ExerciseBackend(LSZXBackend.base_driver.BaseDriver): _score = 0 _result = self.manager.select_a_score(person_id=person_id, score_type=self.exercise_tag) if _result is None: - response_code = self.manager.insert_a_score(record=count, score=real_score, person_id=person_id, + response_code = self.manager.insert_a_score(record=_count, score=_score, person_id=person_id, score_type=self.exercise_tag, person_class=person_class, name=name) - else: + elif _count != -1: _record = float(_result[0]['record']) _score = float(_result[0]['score']) if self.exercise_tag in {PUSHUP, PULLUP, SITUP, OVERHANG, TRICEDIP}: