From 5706fb3ad38c2cdfcb55eceae0661bf80e6f8288 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 12 Oct 2021 14:32:51 -0400 Subject: [PATCH] Don't error out here until we decide if we are going to fully refactor emums or leave as is. --- crc/services/workflow_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crc/services/workflow_service.py b/crc/services/workflow_service.py index 12fa92a3..5af1d253 100755 --- a/crc/services/workflow_service.py +++ b/crc/services/workflow_service.py @@ -415,8 +415,8 @@ class WorkflowService(object): if hasattr(default, "value"): default_option = next((obj for obj in field.options if obj.id == default.value), None) else: - raise ApiError.from_task("invalid_default", "A default for enums must be a dictionary with a" - " value attribute.", task) + # Fixme: We should likely error out on this in validation, or remove this value/label alltogether. + default_option = next((obj for obj in field.options if obj.id == default), None) if not default_option: raise ApiError.from_task("invalid_default", "You specified a default value that does not exist in " "the enum options ", task)