ismail c5bc9134fe
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m22s
fix: analytics command-center crashes for dept_manager (SurveyInstance has no department field)
UnifiedAnalyticsService._filter_by_role tried queryset.filter(department=...) on
SurveyInstance which has no department FK → FieldError → 500 for dept_manager
and director users accessing the command center.

Fixed: check if the model actually has a department field before filtering;
fall back to hospital-level filtering for models without department.

Also: RBAC matrix test updated with more accurate state-based detection.
2026-06-18 16:13:12 +03:00
..
2026-04-08 17:13:35 +03:00