From c717b3ed028a5a838efe5b412e2940e5da4ee77f Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 8 Jan 2025 13:46:21 -0500 Subject: [PATCH] Fix for empty string in regex validator message. xref https://github.com/galaxyproject/galaxy/issues/19386 --- lib/galaxy/tool_util/parser/parameter_validators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/parser/parameter_validators.py b/lib/galaxy/tool_util/parser/parameter_validators.py index 29af9494b0bd..f850e0acce85 100644 --- a/lib/galaxy/tool_util/parser/parameter_validators.py +++ b/lib/galaxy/tool_util/parser/parameter_validators.py @@ -668,9 +668,9 @@ def raise_error_if_valiation_fails( raise AssertionError("Validator logic problem - computed validation value must be boolean") if message is None: message = validator.message - if message is None: + if not message: message = DEFAULT_VALIDATOR_MESSAGE - assert message + assert message is not None if value_to_show and "%s" in message: message = message % value_to_show negate = validator.negate