back 1.0.38 y front 1.0.39 cambios en condicionales de sub preguntas, solo boleanos
This commit is contained in:
@@ -1062,12 +1062,12 @@ def create_answer(
|
||||
if not question:
|
||||
raise HTTPException(status_code=404, detail="Pregunta no encontrada")
|
||||
|
||||
# Calcular puntos según status
|
||||
# Sistema simplificado: 1 punto por pregunta correcta
|
||||
points_earned = 0
|
||||
if answer.status == "ok":
|
||||
points_earned = question.points
|
||||
points_earned = 1
|
||||
elif answer.status == "warning":
|
||||
points_earned = int(question.points * 0.5)
|
||||
points_earned = 0.5
|
||||
|
||||
# Buscar si ya existe una respuesta para esta inspección y pregunta
|
||||
existing_answer = db.query(models.Answer).filter(
|
||||
|
||||
Reference in New Issue
Block a user