From d7cb64aa9c34e1afc6a8fb60b2e00a8d0258d3b2 Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Fri, 8 Jun 2018 19:28:19 +0200 Subject: [PATCH] - fixed ESI error 400 `'connections' items are not all unique` for `getRouteData()` --- app/main/controller/api/route.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/main/controller/api/route.php b/app/main/controller/api/route.php index 0f45aec2..8ddfb64a 100644 --- a/app/main/controller/api/route.php +++ b/app/main/controller/api/route.php @@ -542,7 +542,12 @@ class Route extends Controller\AccessController { // systemIds exist and wer not removed before in filterJumpData() if($systemSourceId && $systemTargetId){ - $connections[] = [$systemSourceId, $systemTargetId]; + $jumpNode = [$systemSourceId, $systemTargetId]; + // jumpNode must be unique for ESI, + // ... there can be multiple connections between same systems in Pathfinder + if(!in_array($jumpNode, $connections)){ + $connections[] = [$systemSourceId, $systemTargetId]; + } } } }