From a00c756c2e43da93bb20f3dd53f4e2bbf6148f98 Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Mon, 27 Mar 2023 11:10:57 +0000
Subject: [PATCH] PathComp component - Frontend:

- Corrected KDisjointPath response generation
---
 .../frontend/service/algorithms/KDisjointPathAlgorithm.py     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py b/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py
index eac91501a..eda8ae5c5 100644
--- a/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py
+++ b/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py
@@ -194,9 +194,9 @@ class KDisjointPathAlgorithm(_Algorithm):
                 no_path_issue = response.get('noPath', {}).get('issue')
                 if no_path_issue is not None: continue
 
-                path_endpoints = response['path'][0]['devices']
+                path_endpoints = response['path'][0]
                 json_reply_service.append(path_endpoints)
-                algorithm.link_list = self.remove_traversed_links(algorithm.link_list, path_endpoints)
+                algorithm.link_list = self.remove_traversed_links(algorithm.link_list, path_endpoints['devices'])
 
         self.json_reply = dict()
         response_list = self.json_reply.setdefault('response-list', [])
-- 
GitLab