Aug 27 - Updated web dashboard card, inspection ownership

This commit is contained in:
2026-08-27 11:53:14 -04:00
parent a36cc93594
commit ba10ec42e0
5 changed files with 42 additions and 14 deletions
+5 -1
View File
@@ -173,9 +173,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: