Value Errors should also alert us that we can't serialize the json.
Enum Label was depending on the options attribute not existing in some situtations, which is a bad assumption. Rather, check for specific properties, and call back to using options as the default.
This commit is contained in:
parent
4d1f4429ff
commit
12b78c1f99
55186
cr_connect.log
55186
cr_connect.log
File diff suppressed because it is too large
Load Diff
|
@ -82,7 +82,7 @@ class ApiError(Exception):
|
|||
try:
|
||||
json.dumps(x)
|
||||
return True
|
||||
except (TypeError, OverflowError):
|
||||
except (TypeError, OverflowError, ValueError):
|
||||
return False
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -39,10 +39,10 @@ pet_label = enum_label(task='task_pet_form',field='pet',value='1') // might r
|
|||
return self.lookup_label(workflow_model, task_name, field, value)
|
||||
elif field.has_property(Task.FIELD_PROP_SPREADSHEET_NAME):
|
||||
return self.lookup_label(workflow_model, task_name, field, value)
|
||||
elif field.type == Task.FIELD_TYPE_ENUM and hasattr(field, 'options'):
|
||||
return self.enum_with_options_label(field, value)
|
||||
elif field.has_property(Task.FIELD_PROP_DATA_NAME):
|
||||
return self.enum_from_task_data_label(spiff_task, field, value)
|
||||
else:
|
||||
return self.enum_with_options_label(field, value)
|
||||
|
||||
def find_field(self, task_name, field_name, workflow):
|
||||
for spec in workflow.spec.task_specs.values():
|
||||
|
|
Loading…
Reference in New Issue