diff --git a/CHANGELOG b/CHANGELOG index 8c14990d688290edf73c98af49f4085c20650892..49fa7fd71b459b2d7e14102872ce1218688f7923 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ minerva (14.0.3) stable; urgency=medium * Bug fix: parsing of CellDesigner files that contained substanceUnits could crash the upload (#985) + * Bug fix: verificatin of version length added when uploading project + implemented (#978) -- Piotr Gawron <piotr.gawron@uni.lu> Wed, 16 Oct 2019 9:00:00 +0200 diff --git a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js index 30825be638e38ba0a1ec680b6ceac9867ab76695..1101dbdf22ff62b044bb20be930466b8da7bc118 100644 --- a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js +++ b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js @@ -1233,14 +1233,15 @@ AddProjectDialog.prototype.onSaveClicked = function () { "verify-annotations": self.isVerifyAnnotations(), "zip-entries": self.getZipEntries() }; - return ServerConnector.addProject(options); + return self.getServerConnector().addProject(options); }).catch(function (error) { if (error instanceof ObjectExistsError) { return Promise.reject(new ValidationError("Project with given id already exists")); } + return Promise.reject(error); }).then(function (project) { - self.callListeners("onProjectAdd", project); + return self.callListeners("onProjectAdd", project); }).finally(function () { GuiConnector.hideProcessing(); }); @@ -1288,6 +1289,11 @@ AddProjectDialog.prototype.checkValidity = function () { isValid = false; } + if (self.getVersion().length > 20) { + error += "<li>version must be shorter than 20 characters</li>"; + isValid = false; + } + var rootExist = 0, i; for (i = 0; i < self.getZipEntries().length; i++) { if (self.getZipEntries()[i].getData().root) {