From 1a116680dc50798d10d17bbb7063e324d1a41e3c Mon Sep 17 00:00:00 2001
From: Ray Liu <ray.liu@umccr.org>
Date: Mon, 18 Nov 2024 14:12:23 +1100
Subject: [PATCH] add distinct to remove duplicate results

---
 .../workflow-manager/workflow_manager/viewsets/workflow_run.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/workload/stateless/stacks/workflow-manager/workflow_manager/viewsets/workflow_run.py b/lib/workload/stateless/stacks/workflow-manager/workflow_manager/viewsets/workflow_run.py
index 6e5adaa00..a87bbea9f 100644
--- a/lib/workload/stateless/stacks/workflow-manager/workflow_manager/viewsets/workflow_run.py
+++ b/lib/workload/stateless/stacks/workflow-manager/workflow_manager/viewsets/workflow_run.py
@@ -94,7 +94,7 @@ def exclude_params(params):
                 Q(libraries__library_id__icontains=search_params) |
                 Q(libraries__orcabus_id__icontains=search_params) |
                 Q(workflow__workflow_name__icontains=search_params)
-            )
+            ).distinct() # Add distinct to remove duplicates
             
         return result_set