Commit 08919703 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_dms: use default value for site

but why this script is in this bt5...
parent b921cd9e
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Security categories assigned from the Person who is set as the destination Security categories assigned from the Person who is set as the destination
of the document (e.g. in Memo type). of the document (e.g. in Memo type).
""" """
from Products.ERP5Type.Log import log #from Products.ERP5Type.Log import log
category_list = [] category_list = []
for ob in object.getDestinationValueList(): for ob in object.getDestinationValueList():
...@@ -15,8 +15,11 @@ for ob in object.getDestinationValueList(): ...@@ -15,8 +15,11 @@ for ob in object.getDestinationValueList():
if category_value not in (None, ''): if category_value not in (None, ''):
category_dict[base_category] = category_value category_dict[base_category] = category_value
else: else:
raise RuntimeError, "Error: '%s' property is required in order to update person security group" % (base_category) if base_category == 'site':
category_dict[base_category] = 'main/warehouse'
else:
raise RuntimeError, "Error: '%s' property is required in order to update person security group" % (base_category)
category_list.append(category_dict) category_list.append(category_dict)
log(category_list) #log(category_list)
return category_list return category_list
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment