Commit bb40e87f authored by David Hoksza's avatar David Hoksza
Browse files

failing promise issue

parent fbce6173
Pipeline #7591 passed with stages
in 1 minute and 24 seconds
......@@ -376,17 +376,13 @@ function initDrugBioEntities(){
let drugNames;
return $.ajax(settings.dataSource).then(function (csv) {
return jq.ajax(settings.dataSource).then(function (csv) {
globals.adrData= parseAdrCsv(csv);
drugNames = getDrugs(globals.adrData);
const promisses = drugNames.map(d =>
queryMinervaApi(`projects/${minervaProxy.project.data.getProjectId()}/drugs:search?query=${d}`).then(function( data, textStatus, jqXHR ) {
return data;
}, function( jqXHR, textStatus, errorThrown ) {
return undefined;
})
queryMinervaApi(`projects/${minervaProxy.project.data.getProjectId()}/drugs:search?query=${d}`).catch(()=>undefined)
);
return Promise.all(promisses);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment