We now assure each form field has a field type. Modified populate_form_with_random_data, added check at beginning of form field loop.

This commit is contained in:
mike cullerton 2020-12-28 18:02:16 -05:00
parent 86ba20b2b4
commit 7938ac8eed
1 changed files with 4 additions and 0 deletions

View File

@ -126,6 +126,10 @@ class WorkflowService(object):
form_data = task.data # Just like with the front end, we start with what was already there, and modify it.
hide_groups = []
for field in task_api.form.fields:
# Assure we have a field type
if field.type is None:
raise ApiError(code='invalid_form_data',
message='Field type is None. A field type must be provided.')
# Assure field has valid properties
WorkflowService.check_field_properties(field, task)