v0.8.5测试
This commit is contained in:
@@ -80,18 +80,6 @@ class ConductService:
|
||||
fail_count += 1
|
||||
continue
|
||||
|
||||
# 检查分数是否会超出范围(防止溢出)
|
||||
current_points = student.get("total_points", 0)
|
||||
new_points = current_points + points_change
|
||||
if new_points < 0:
|
||||
details.append({"student_id": student_id, "error": f"分数不能为负(当前{current_points},操作{points_change})"})
|
||||
fail_count += 1
|
||||
continue
|
||||
if new_points > 100:
|
||||
details.append({"student_id": student_id, "error": f"分数不能超过100(当前{current_points},操作{points_change})"})
|
||||
fail_count += 1
|
||||
continue
|
||||
|
||||
# 创建记录
|
||||
record_id = await ConductModel.create_record(
|
||||
student_id=student_id,
|
||||
|
||||
Reference in New Issue
Block a user