From 907b85ec7f56b4c4707111f876352c474382c1a2 Mon Sep 17 00:00:00 2001 From: Benjamin Ooghe-Tabanou Date: Thu, 14 Dec 2023 19:04:52 +0100 Subject: [PATCH] fix edge case when users created a corpus called corpus /o\ --- hyphe_frontend/app/js/service_hyphe_api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyphe_frontend/app/js/service_hyphe_api.js b/hyphe_frontend/app/js/service_hyphe_api.js index 5736b79d..3fe61e80 100644 --- a/hyphe_frontend/app/js/service_hyphe_api.js +++ b/hyphe_frontend/app/js/service_hyphe_api.js @@ -820,7 +820,7 @@ angular.module('hyphe.service_hyphe_api', []) window.location.reload(); } if(target !== undefined){ - if(target && target.corpus && target.corpus.corpus_id && target.corpus.status != "ready" && $location.path()!=='/admin') { + if(target && target.corpus && target.corpus.corpus_id && target.corpus.status != "ready" && $location.path()!=='/admin' && pseudo_route !== API.CORPUS_LIST_GET) { if (pseudo_route !== API.CORPUS_START) { ns.startCorpus({ id: corpus.getId(), @@ -839,7 +839,7 @@ angular.module('hyphe.service_hyphe_api', []) successCallback(target, response.data[0]) } } else { - if(response.data[0] && response.data[0].message && response.data[0].message.status && response.data[0].message.status != "ready" && $location.path()!=='/admin') { + if(response.data[0] && response.data[0].message && response.data[0].message.status && response.data[0].message.status != "ready" && $location.path()!=='/admin' && pseudo_route !== API.CORPUS_LIST_GET) { if (pseudo_route !== API.CORPUS_START) { ns.startCorpus({ id: corpus.getId(),