bouncing to fix a bug in SpiffWorkflow that was holding outo outdated data deed within the python_script_engine.
This caused validation to fail for valid repeat sections, so including a fix to allow that validation to continue.
This commit is contained in:
parent
fd468f1013
commit
318cd34f81
|
@ -979,7 +979,7 @@
|
|||
},
|
||||
"spiffworkflow": {
|
||||
"git": "https://github.com/sartography/SpiffWorkflow.git",
|
||||
"ref": "1df28b940ec0d32b672e59e3d17e7a804cb2b186"
|
||||
"ref": "e266745f6ff74995f125dd3821eab36cfe745a54"
|
||||
},
|
||||
"sqlalchemy": {
|
||||
"hashes": [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import copy
|
||||
import string
|
||||
from datetime import datetime
|
||||
import random
|
||||
|
@ -328,7 +329,13 @@ class WorkflowService(object):
|
|||
# Then you must evaluate the expression based on the data within the group only.
|
||||
group = field.get_property(Task.FIELD_PROP_REPEAT)
|
||||
if group in task.data:
|
||||
# Here we must make the current group data top level (as it would be in a repeat section) but
|
||||
# make all other top level task data available as well.
|
||||
new_data = copy.deepcopy(task.data)
|
||||
del(new_data[group])
|
||||
data = task.data[group][0]
|
||||
data.update(new_data)
|
||||
|
||||
try:
|
||||
return task.workflow.script_engine.eval(expression, data)
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in New Issue