From a3e6e41b6916a3e68e3c67fb83e6f2a5ab2d9b57 Mon Sep 17 00:00:00 2001 From: Kelsey Maes Date: Wed, 18 Jun 2025 16:39:10 -0700 Subject: [PATCH] Fix 0 being treated as an invalid subject ID `_parse_subject_id()` returns `None` if the string is invalid but the conditional was only checking for truthiness which 0, a valid subject ID, does not possess. --- yakut/VERSION | 2 +- yakut/subject_specifier_processor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yakut/VERSION b/yakut/VERSION index a803cc2..930e300 100644 --- a/yakut/VERSION +++ b/yakut/VERSION @@ -1 +1 @@ -0.14.0 +0.14.1 diff --git a/yakut/subject_specifier_processor.py b/yakut/subject_specifier_processor.py index 8357e40..8f44901 100644 --- a/yakut/subject_specifier_processor.py +++ b/yakut/subject_specifier_processor.py @@ -41,7 +41,7 @@ async def process_subject_specifier( sp_sbj_id, sp_dty = specifier.split(":") _logger.info("Subject specifier interpreted as explicit: %r", (sp_sbj_id, sp_dty)) subject_id = _parse_subject_id(sp_sbj_id) - if not subject_id: + if subject_id is None: raise BadSpecifierError(f"{subject_id} is not a valid subject-ID") return subject_id, dtype_loader.load_dtype(sp_dty)