diff --git a/app/routes/inspection_schedules.py b/app/routes/inspection_schedules.py index 5455ff3..65184e8 100644 --- a/app/routes/inspection_schedules.py +++ b/app/routes/inspection_schedules.py @@ -42,6 +42,7 @@ from app.models.inspection_schedule import (InspectionSchedule, DEFAULT_RUN_HOUR) from app.models.inspection import Inspection, InspectionTemplate from app.models.facility import Facility, Area +from app.models.project import Project from app.models.user import User from functools import wraps from app.utils.decorators import project_manager_required diff --git a/app/templates/inspection_schedules/form.html b/app/templates/inspection_schedules/form.html index bbe6ac2..36aacdc 100644 --- a/app/templates/inspection_schedules/form.html +++ b/app/templates/inspection_schedules/form.html @@ -9,7 +9,6 @@ the auto/plan MODE. They are placed next to the field they qualify rather than in a block of their own. #} -{% block content %} {# ── Sticky values ──────────────────────────────────────────────────────── This form is hand-built (no WTForms), so a re-render after a validation error would otherwise come back blank and the user would retype everything. @@ -33,6 +32,8 @@ {% set v_nth_weekday = (posted.get('nth_weekday')|int(-1)) if posted else (schedule.nth_weekday if schedule and schedule.nth_weekday is not none else -1) %} {% set v_weekdays = (posted.getlist('weekdays')|map('int')|list) if posted else (schedule.weekday_list if schedule else []) %} {% set v_active = (posted.get('active') is not none) if posted else (schedule.active if schedule else True) %} + +{% block content %}