summaryrefslogtreecommitdiffstats
path: root/src/collective/dms/batchimport/fileimporter.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/collective/dms/batchimport/fileimporter.py')
-rw-r--r--src/collective/dms/batchimport/fileimporter.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/collective/dms/batchimport/fileimporter.py b/src/collective/dms/batchimport/fileimporter.py
index 31d3b96..558f75d 100644
--- a/src/collective/dms/batchimport/fileimporter.py
+++ b/src/collective/dms/batchimport/fileimporter.py
@@ -29,6 +29,7 @@ class IImportFileFormSchema(form.Schema):
location = schema.Text(required=False)
owner = schema.Text(required=False)
treating_groups = schema.Text(required=False) # new, comme separated identifiers
+ recipient_groups = schema.Text(required=False) # new, comme separated identifiers
keywords = schema.Text(required=False) # comma separated identifiers
# legacy
@@ -79,13 +80,17 @@ class ImportFileForm(form.SchemaForm):
else:
treating_groups = set([x.strip() for x in (data['treating_groups'] or '').split(',')])
+ recipient_groups = set([x.strip() for x in (data['recipient_groups'] or '').split(',')])
+
folder = self.get_folder(data['location'])
keywords = set([x.strip() for x in (data['keywords'] or '').split(',')])
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, treating_groups=treating_groups,
+ filename, data['file'], owner,
+ treating_groups=treating_groups,
+ recipient_groups=recipient_groups,
metadata={
'title': data.get('title'),
'keywords': keywords,