diff --git a/app/routes/inspections.py b/app/routes/inspections.py index 09d5c51..e5c303e 100644 --- a/app/routes/inspections.py +++ b/app/routes/inspections.py @@ -105,10 +105,12 @@ def _compute_score_from_form(form_fields, responses): if field['type'] == 'rating': try: v = int(val) + if v == 0: + continue # 0 = not answered, skip entirely earned += v - total += 5 # max rating is 5 stars + total += 5 except (ValueError, TypeError): - total += 5 + pass # unparseable = not answered, skip elif field['type'] == 'checkbox': total += 1