summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2014-01-02 14:13:30 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2014-01-02 14:13:30 (GMT)
commit46612b45e52c6d165c2e8cc4973a681b986a41b5 (patch)
tree6cd82ca7715e9f4f3013af93ce493ebf51ff5f00
parent4ebe74c350f5ec7b8cc4154863a36cded29c26a8 (diff)
downloadcollective.dms.batchimport-46612b45e52c6d165c2e8cc4973a681b986a41b5.zip
collective.dms.batchimport-46612b45e52c6d165c2e8cc4973a681b986a41b5.tar.gz
collective.dms.batchimport-46612b45e52c6d165c2e8cc4973a681b986a41b5.tar.bz2
fix setting of title
-rw-r--r--src/collective/dms/batchimport/fileimporter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/collective/dms/batchimport/fileimporter.py b/src/collective/dms/batchimport/fileimporter.py
index ea68f1e..645877a 100644
--- a/src/collective/dms/batchimport/fileimporter.py
+++ b/src/collective/dms/batchimport/fileimporter.py
@@ -71,7 +71,7 @@ class ImportFileForm(form.SchemaForm):
owner = data['owner']
folder = self.get_folder(data['location'])
- document_id = self.convertTitleToId(os.path.splitext(filename)[0])
+ document_id = self.convertTitleToId(data.get('title') or os.path.splitext(filename)[0])
utils.createDocument(self, folder, portal_type, document_id,
- filename, data['file'], owner)
+ filename, data['file'], owner, {'title': data.get('title')})