Jul 30 - Update backend for iPad - inspector can re-inspect and create follow-up
This commit is contained in:
@@ -356,6 +356,12 @@ def start(schedule_id):
|
||||
inspection_date = now_eastern(),
|
||||
status = 'in_progress',
|
||||
scheduled_inspection_id = sched.id,
|
||||
# phase45 — a schedule created by "Schedule Follow-up" carries the
|
||||
# inspection it is a follow-up of. Inheriting it here is what makes the
|
||||
# run a real linked re-inspection: execute() pre-fills from the parent
|
||||
# and submit clears the parent's follow_up_required. NULL for ordinary
|
||||
# schedules, which is every pre-phase45 row.
|
||||
parent_inspection_id = sched.parent_inspection_id,
|
||||
)
|
||||
db.session.add(inspection)
|
||||
db.session.commit()
|
||||
|
||||
Reference in New Issue
Block a user