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}: