Skip to content

Commit 352fa3b

Browse files
marcelsafinCopilot
andcommitted
fix(workflows): only accept schema_version 1.0 so the error message is accurate
The check also accepted "1" while the error said Expected '1.0'. Unquoted YAML 1.0 still works via str(); plain 1 is now rejected with the message that matches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent aacfb66 commit 352fa3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/specify_cli/workflows/engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def validate_workflow(definition: WorkflowDefinition) -> list[str]:
131131
# -- Schema version ---------------------------------------------------
132132
# str() so an unquoted ``schema_version: 1.0`` (YAML float) is accepted —
133133
# rejecting it would print "Unsupported schema_version 1.0. Expected '1.0'."
134-
if str(definition.schema_version) not in ("1.0", "1"):
134+
if str(definition.schema_version) != "1.0":
135135
errors.append(
136136
f"Unsupported schema_version {definition.schema_version!r}. "
137137
f"Expected '1.0'."

0 commit comments

Comments
 (0)