MAINT-11 review: test an empty unit at the web layer and the page's own refusal words; drop a stale comment
Two reviewer mutations survived the suite: the web layer routing only a truthy unit (an empty unit then started the bare pick), and the page showing the server's English instead of its own sentence by code. Both are now checked. The bare maint_start comment that said a per-battery unit would ship half a surface is replaced by a pointer to _maint_unit_action(). No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7564,10 +7564,8 @@ class Controller:
|
||||
# picked on its own. At N=1 both branches are `maints[0]` and this
|
||||
# is the shipped call, byte for byte.
|
||||
#
|
||||
# A PER-PACK BUTTON IS A UI CARD, NOT THIS ONE. `web.py` posts a
|
||||
# bare `maint_start` with no unit, and inventing a unit parameter
|
||||
# here would ship half a surface: the page would still have one
|
||||
# button and the API would have two meanings.
|
||||
# This is the bare request (no unit). A request naming a battery
|
||||
# was handled above by `_maint_unit_action()` (MAINT-11).
|
||||
_m = self._maint_button(now)
|
||||
for msg in _m.force_start(now):
|
||||
self.log_event(msg, hint=messages.hint("maintenance",
|
||||
|
||||
Reference in New Issue
Block a user