Put the preamble back in to the error message.

This commit is contained in:
mike cullerton 2021-02-19 15:57:01 -05:00
parent e0de1d0b3b
commit 4fc2929356
1 changed files with 2 additions and 2 deletions

View File

@ -48,13 +48,13 @@ def validate_workflow_specification(spec_id):
try:
WorkflowService.test_spec(spec_id)
except ApiError as ae:
# ae.message = "When populating all fields ... \n" + ae.message
ae.message = "When populating all fields ... \n" + ae.message
errors['all'] = ae
try:
# Run the validation twice, the second time, just populate the required fields.
WorkflowService.test_spec(spec_id, required_only=True)
except ApiError as ae:
# ae.message = "When populating only required fields ... \n" + ae.message
ae.message = "When populating only required fields ... \n" + ae.message
errors['required'] = ae
interpreted_errors = ValidationErrorService.interpret_validation_errors(errors)
return ApiErrorSchema(many=True).dump(interpreted_errors)