Commit 2b38765d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1367-remove-non-existing-project' into 'devel_15.1.x'

don't show error when project does not exist

See merge request !1257
parents c04c6a8b 479cc04f
Pipeline #34560 passed with stage
in 17 minutes and 1 second
......@@ -7,6 +7,8 @@ minerva (15.1.1) stable; urgency=medium
project returned access denied status insted Not Found (#1370)
* Bug fix: results for chembl targetting uniprot without gene name (for
example P0C2L1) could crash caching (#1377)
* Bug fix: removing non-existing project results in warning not an error
message (#1367)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 23 Nov 2020 15:00:00 +0200
......
......@@ -9,6 +9,7 @@ var EditProjectDialog = require('./EditProjectDialog');
var LogListDialog = require('./LogListDialog');
var PrivilegeType = require('../../map/data/PrivilegeType');
var ConfigurationType = require('../../ConfigurationType');
var NetworkError = require('../../NetworkError');
// noinspection JSUnusedLocalSymbols
var logger = require('../../logger');
......@@ -163,7 +164,14 @@ MapsAdminPanel.prototype._createProjectTableRow = function () {
if (param.status) {
return self.removeProject($(button).attr("data"))
}
}).catch(GuiConnector.alert);
}).catch(function (e) {
if (e instanceof NetworkError && e.statusCode === 404) {
GuiConnector.warn("Project does not exist")
return self.onRefreshClicked();
} else {
GuiConnector.alert(e);
}
});
});
$(projectsTable).on("click", "[name='showEditDialog']", function () {
......
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