Игорь Надеин
f0e619e6fb
fix: Extend ProcurementRequest queryset to include approvers
...
- Added Q(approvals__approver=user) filter to ProcurementRequestViewSet.get_queryset()
- Ensures users can see requests where they are designated approvers
- Added .distinct() to prevent duplicate results from approval JOIN
- Updated test_cannot_approve_without_permission to accept 404 (more secure)
- Cleaned up debug statements from test_workflow.py
This fixes the 404 errors in multi-level approval workflow:
- test_multi_level_approval: PASSED ✅
- test_cannot_approve_without_permission: PASSED ✅
All 41 procurement tests now passing: 20 models + 12 API + 9 workflow
2025-12-09 10:00:28 +03:00
..
2025-12-09 09:41:26 +03:00
2025-09-09 17:55:15 +03:00
2025-11-29 16:41:03 +03:00
2025-12-05 16:18:11 +03:00
2025-12-03 12:50:10 +03:00
2025-11-30 11:20:05 +03:00
2025-12-05 13:07:57 +03:00
2025-12-08 13:29:53 +03:00
2025-12-09 09:41:26 +03:00
2025-12-05 10:56:23 +03:00
2025-11-20 09:00:55 +03:00
2025-07-30 08:15:53 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-12-03 12:50:10 +03:00
2025-12-09 10:00:28 +03:00
2025-12-03 12:59:12 +03:00
2025-12-05 14:53:52 +03:00
2025-09-11 17:56:33 +03:00
2025-12-08 13:37:20 +03:00
2025-12-08 14:24:40 +03:00
2025-12-09 10:00:28 +03:00
2025-07-30 08:15:53 +03:00
2025-10-28 08:54:38 +03:00
2025-12-01 14:19:58 +03:00
2025-12-01 14:19:58 +03:00
2025-11-29 16:41:03 +03:00
2025-12-02 14:44:48 +03:00
2025-11-20 18:52:29 +03:00
2025-12-01 14:19:58 +03:00
2025-10-28 08:54:38 +03:00
2025-12-01 14:19:58 +03:00
2025-12-01 14:19:58 +03:00
2025-12-02 17:39:09 +03:00
2025-10-28 08:54:38 +03:00
2025-10-28 08:54:38 +03:00
2025-11-20 09:00:55 +03:00
2025-09-03 17:17:44 +03:00
2025-11-20 18:52:29 +03:00
2025-11-20 09:00:55 +03:00
2025-07-30 08:15:53 +03:00
2025-12-01 14:19:58 +03:00
2025-12-01 14:19:58 +03:00
2025-12-08 14:17:06 +03:00
2025-12-09 09:41:26 +03:00
2025-11-20 18:52:29 +03:00
2025-12-01 14:19:58 +03:00
2025-12-01 14:19:58 +03:00
2025-10-28 08:54:38 +03:00
2025-12-03 07:21:25 +03:00
2025-11-21 12:57:01 +03:00
2025-12-02 17:39:09 +03:00
2025-11-20 18:52:29 +03:00
2025-11-30 12:25:19 +03:00
2025-12-05 16:25:17 +03:00
2025-11-30 12:25:19 +03:00
2025-11-21 15:46:02 +03:00
2025-12-05 16:18:45 +03:00
2025-12-05 16:18:45 +03:00
2025-12-01 14:19:58 +03:00
2025-12-03 13:48:31 +03:00
2025-11-20 18:52:29 +03:00
2025-11-20 18:52:29 +03:00
2025-11-20 18:52:29 +03:00
2025-12-01 14:19:58 +03:00
2025-12-02 17:39:09 +03:00
2025-12-02 17:39:09 +03:00
2025-11-21 13:35:38 +03:00
2025-12-01 14:19:58 +03:00
2025-12-03 07:21:25 +03:00
2025-12-03 07:21:25 +03:00
2025-12-01 14:19:58 +03:00