蛇形跑补丁

This commit is contained in:
渣渣和 2024-10-08 14:07:37 +08:00
parent d7e63931d3
commit 6895220cd9
2 changed files with 3 additions and 2 deletions

View File

@ -56,6 +56,7 @@ class Runaround(BaseExercise):
gender = "woman" if self.info.get(GENDER) == "" else "man" gender = "woman" if self.info.get(GENDER) == "" else "man"
# if self.costtime == '未完成': # if self.costtime == '未完成':
if self.costtime < 0: if self.costtime < 0:
self.costtime = 5
score = 0 score = 0
else: else:
score = get_fin_score.Military(gender, int(age), score = get_fin_score.Military(gender, int(age),

View File

@ -590,10 +590,10 @@ class ExerciseBackend(LSZXBackend.base_driver.BaseDriver):
_score = 0 _score = 0
_result = self.manager.select_a_score(person_id=person_id, score_type=self.exercise_tag) _result = self.manager.select_a_score(person_id=person_id, score_type=self.exercise_tag)
if _result is None: 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, score_type=self.exercise_tag,
person_class=person_class, name=name) person_class=person_class, name=name)
else: elif _count != -1:
_record = float(_result[0]['record']) _record = float(_result[0]['record'])
_score = float(_result[0]['score']) _score = float(_result[0]['score'])
if self.exercise_tag in {PUSHUP, PULLUP, SITUP, OVERHANG, TRICEDIP}: if self.exercise_tag in {PUSHUP, PULLUP, SITUP, OVERHANG, TRICEDIP}: