Aug 27 - Update code to follow-up with ST functions

This commit is contained in:
2026-08-27 11:54:07 -04:00
parent 3bfd81c84c
commit 2d68bad966
10 changed files with 617 additions and 16 deletions
+5 -1
View File
@@ -175,9 +175,13 @@ def index():
if not inspector_facility_ids:
followup_q = followup_q.filter(False)
else:
# OWNERSHIP, not authorship — see Inspection.follow_up_owned_by().
# An assigned follow-up lives on an inspection somebody else
# performed, so testing inspector_id made the card read 0 for the
# very person who had been asked to do the work.
followup_q = followup_q.filter(
Inspection.facility_id.in_(inspector_facility_ids),
Inspection.inspector_id == current_user.id,
Inspection.follow_up_owned_by(current_user.id),
)
elif is_customer:
if customer_facility_ids: