Commit 77035cd9 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

id_as_reference.py: add prefix adding function based on ref.

parent 43ddb2a6
......@@ -68,4 +68,11 @@ def IdAsReferenceMixin(suffix):
security.declareProtected(Permissions.ModifyPortalContent, 'setReference')
setReference = _setReference
def _setRef(self, value):
self.__dict__.pop('ref', None) # BBB
self.setId(suffix + value)
security.declareProtected(Permissions.ModifyPortalContent, 'setRef')
setRef = _setRef
return IdAsReferenceMixin
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