Aug 4 - Update code to follow up - MT11
This commit is contained in:
@@ -146,11 +146,13 @@ def _fulfill_schedule(inspection):
|
||||
"""Roll the originating schedule forward. Caller commits.
|
||||
|
||||
Mirrors routes/inspections.py exactly, including passing `_compute_next_run`
|
||||
as `next_run_fn`. That argument is NOT optional in practice: MT's
|
||||
`InspectionSchedule.fulfill()` leaves `next_run_at` untouched when it is
|
||||
omitted, so the schedule would stay permanently due and keep firing overdue
|
||||
reminders. The deferred import mirrors the web route and avoids a module-load
|
||||
cycle between the api and routes packages.
|
||||
as `next_run_fn`. As of phase46 that argument is accepted and ignored: the
|
||||
cadence maths moved onto `InspectionSchedule.advance_due_date()`, which owns
|
||||
the recurrence columns and the end-date boundary. Before phase46 omitting it
|
||||
silently left `next_run_at` untouched and the schedule stayed permanently
|
||||
due; the call is kept as-is so this file needs no behavioural change. The
|
||||
deferred import mirrors the web route and avoids a module-load cycle between
|
||||
the api and routes packages.
|
||||
"""
|
||||
if not inspection.inspection_schedule_id:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user