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
+6 -1
View File
@@ -152,9 +152,14 @@ def dashboard_stats():
if not fids:
followup_q = followup_q.filter(False)
else:
# OWNERSHIP, not authorship: a follow-up handed to this inspector
# belongs to them even though somebody else performed the original.
# This tile sits directly above the Follow-up Requests list, which
# filters the same way — counting authorship here made the two
# disagree on the same screen.
followup_q = followup_q.filter(
Inspection.facility_id.in_(fids),
Inspection.inspector_id == user.id,
Inspection.follow_up_owned_by(user.id),
)
pending_followups = followup_q.count()