Fixes problem with initializing some task data fields

we had a problem where sometimes, task data gets some values set in its fields to None, which conflicts with default values. this fixes that
This commit is contained in:
alicia pritchett 2021-12-10 11:33:26 -05:00
parent 23fa28bc23
commit 962cf7c32c

View File

@ -380,7 +380,8 @@ class WorkflowService(object):
@staticmethod
def evaluate_property(property_name, field, task):
expression = field.get_property(property_name)
data = task.data
data = copy.deepcopy(task.data)
# If there's a field key with no initial value, give it one (None)
for field in task.task_spec.form.fields:
if field.id not in data: