fix: scope inferred work-order tasks to the current work order
Prevent service-record inference from pulling tasks from other work orders that share the same vehicle. This keeps task-service-context, service reports, and related work-order widgets isolated to the selected nalog. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -155,6 +155,7 @@ def _work_order_related_tasks_queryset(work_order):
|
||||
vehicle_id=work_order.vehicle_id,
|
||||
task_id__isnull=False,
|
||||
task__is_active=True,
|
||||
task__work_order=work_order,
|
||||
).values_list('task_id', flat=True)
|
||||
)
|
||||
task_ids = list({*direct_task_ids, *inferred_task_ids})
|
||||
|
||||
Reference in New Issue
Block a user