fix setting of title

This commit is contained in:
Frédéric Péters 2014-01-02 15:13:30 +01:00
parent 4ebe74c350
commit 46612b45e5
1 changed files with 2 additions and 2 deletions

View File

@ -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')})