fix: thread config.json's Pot.mass into both UI clients' displayed mass
Sud._parse_data() already falls back to config.json's Pot section when a loaded sud.json doesn't override 'mass', but neither client actually passed that config through, so displayed pot mass silently read 0 kg whenever a recipe didn't set its own 'pot.mass'. client/brewpi_gui.py: capture the System message's 'Pot' key (already sent by the server, previously ignored) into self.pot_config, and pass it to Sud._parse_data(doc, self.pot_config). web/app.js: parseSudDoc()'s potMass now falls back to the module-level potConfig.mass (already captured from msg.Pot elsewhere, just never consulted here) before defaulting to 0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M2ierBoxW3v7nUbDw3M2pE
This commit is contained in:
+4
-1
@@ -153,7 +153,10 @@ function parseSudDoc(doc) {
|
||||
return {
|
||||
name: doc.Name || '',
|
||||
schedule: schedule,
|
||||
potMass: pot.mass || 0,
|
||||
// Falls back to config.json's Pot.mass (via potConfig, set from
|
||||
// the System message) when the loaded doc doesn't override it -
|
||||
// mirrors components/sud.py's Sud._parse_data().
|
||||
potMass: pot.mass || potConfig.mass || 0,
|
||||
grainMass: pot.grain_mass || 0,
|
||||
waterMass: pot.water_mass || 0,
|
||||
volumen: pot.volumen || 0,
|
||||
|
||||
Reference in New Issue
Block a user