Commit c2f2b03f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

project version length is limited to 20 characers

parent 6798ba79
Pipeline #15121 passed with stage
in 15 minutes and 4 seconds
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
......
......@@ -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) {
......
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