summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2018-04-26 08:14:05 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2018-04-26 08:15:16 (GMT)
commit10c1e517908eefe9b5a5ee02217bd6c3faa9e25d (patch)
tree1efde39376729c5f5cf549573122481ffc4d7312
parentdfc266661a7265397507bd3c0e67c8cf50c00781 (diff)
downloadcollective.dms.batchimport-10c1e517908eefe9b5a5ee02217bd6c3faa9e25d.zip
collective.dms.batchimport-10c1e517908eefe9b5a5ee02217bd6c3faa9e25d.tar.gz
collective.dms.batchimport-10c1e517908eefe9b5a5ee02217bd6c3faa9e25d.tar.bz2
handle empty keywords (#22009)
-rw-r--r--src/collective/dms/batchimport/fileimporter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/collective/dms/batchimport/fileimporter.py b/src/collective/dms/batchimport/fileimporter.py
index 2a62af9..2201f01 100644
--- a/src/collective/dms/batchimport/fileimporter.py
+++ b/src/collective/dms/batchimport/fileimporter.py
@@ -73,7 +73,7 @@ class ImportFileForm(form.SchemaForm):
owner = data['owner']
treating_group = data['treating_group']
folder = self.get_folder(data['location'])
- keywords = set([x.strip() for x in data['keywords'].split(',')])
+ keywords = set([x.strip() for x in (data['keywords'] or '').split(',')])
document_id = self.convertTitleToId(data.get('title') or os.path.splitext(filename)[0])