Merge pull request #10070 from OlegZharkov/import-numbers-to-lib-folder

Allow numbers as filenames while adding datasets to library folder
This commit is contained in:
Björn Grüning
2020-08-11 20:47:07 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
@@ -666,7 +666,8 @@ var FolderToolbarView = Backbone.View.extend({
this.modal.disableButton("Import");
for (let i = selected_nodes.length - 1; i >= 0; i--) {
if (selected_nodes[i].li_attr.full_path !== undefined) {
paths.push(selected_nodes[i].li_attr.full_path);
// should be always String
paths.push(`"${selected_nodes[i].li_attr.full_path}"`);
}
}
this.initChainCallControl({
@@ -396,6 +396,9 @@ class LibraryDatasetsController(BaseAPIController, UsesVisualizationMixin, Libra
path = kwd.get('path', None)
if path is None:
raise exceptions.RequestParameterMissingException('The required attribute path is missing.')
if not isinstance(path, str):
raise exceptions.RequestParameterInvalidException('The required attribute path is not String.')
folder = self.folder_manager.get(trans, folder_id)
source = kwd.get('source', None)