Salva apre il «Salva con nome» prima di scaricare; riepilogo senza deviazione 0 per quota NaN (Refs #119 #118)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019A9CSrh9rfM5WwqKtg8BSE
This commit is contained in:
2026-10-28 21:23:55 +01:00
parent 93afd6187c
commit 08aefa9888
2 changed files with 13 additions and 7 deletions
+2 -1
View File
@@ -440,7 +440,8 @@ def task_complete(recipe_id: int):
m["subtask"] = st
m["task_info"] = subtask_task_map.get(m.get("subtask_id"), {})
# Compute deviation if not present
if m.get("deviation") is None and st.get("nominal") is not None:
# #118: quota non misurata (value None): la deviazione resta None (il template mostra NaN)
if m.get("deviation") is None and st.get("nominal") is not None and m.get("value") is not None:
try:
m["deviation"] = m["value"] - st["nominal"]
except (TypeError, KeyError):