[CMF-checkins] CVS: CMF/DCWorkflow - DCWorkflow.py:1.12 Variables.py:1.3
Shane Hathaway
shane@digicool.com
Tue, 30 Oct 2001 10:37:37 -0500
Update of /cvs-repository/CMF/DCWorkflow
In directory cvs.zope.org:/tmp/cvs-serv11053
Modified Files:
DCWorkflow.py Variables.py
Log Message:
Some variables should be updated with every transition, some shouldn't.
Added a per-variable configuration option.
=== CMF/DCWorkflow/DCWorkflow.py 1.11 => 1.12 ===
elif tdef_exprs.has_key(id):
expr = tdef_exprs[id]
- elif former_status.has_key(id):
+ elif not vdef.update_always and former_status.has_key(id):
# Preserve former value
value = former_status[id]
else:
=== CMF/DCWorkflow/Variables.py 1.2 => 1.3 ===
default_expr = None # Overrides default_value if set
info_guard = None
+ update_always = 1
manage_options = (
{'label': 'Properties', 'action': 'manage_properties'},
@@ -155,6 +156,7 @@
def setProperties(self, description,
default_value='', default_expr='',
for_catalog=0, for_status=0,
+ update_always=0,
props=None, REQUEST=None):
'''
'''
@@ -172,6 +174,7 @@
self.info_guard = None
self.for_catalog = not not for_catalog # Pure boolean value
self.for_status = not not for_status
+ self.update_always = not not update_always
if REQUEST is not None:
return self.manage_properties(REQUEST, 'Properties changed.')