summaryrefslogtreecommitdiffstats
path: root/src/collective/dms/batchimport/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/collective/dms/batchimport/utils.py')
-rw-r--r--src/collective/dms/batchimport/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/collective/dms/batchimport/utils.py b/src/collective/dms/batchimport/utils.py
index 6e06c5f..cc2cc35 100644
--- a/src/collective/dms/batchimport/utils.py
+++ b/src/collective/dms/batchimport/utils.py
@@ -21,7 +21,7 @@ log = logging.getLogger('collective.dms.batchimport')
def createDocument(context, folder, portal_type, document_id, filename,
- file_object, owner=None, treating_group=None, metadata=None):
+ file_object, owner=None, treating_groups=None, metadata=None):
if owner is None:
owner = api.user.get_current().id
@@ -47,11 +47,11 @@ def createDocument(context, folder, portal_type, document_id, filename,
if IDeadline and IDeadline.providedBy(document):
document.deadline = deadlineDefaultValue(None)
- if treating_group:
+ if treating_groups:
canwrite_dm = LocalRolesToPrincipalsDataManager(document,
IDmsDocument['treating_groups'])
canwrite_dm.set([])
- canwrite_dm.set([treating_group])
+ canwrite_dm.set(list(treating_groups))
document.reindexObjectSecurity()
version = createContentInContainer(document, 'dmsmainfile',