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 @@
Security categories assigned from the Person who is set as the destination
of the document (e.g. in Memo type).
"""
from Products.ERP5Type.Log import log
#from Products.ERP5Type.Log import log
category_list = []
for ob in object.getDestinationValueList():
......@@ -14,9 +14,12 @@ for ob in object.getDestinationValueList():
category_value = ob.getProperty(base_category)
if category_value not in (None, ''):
category_dict[base_category] = category_value
else:
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)
log(category_list)
#log(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