Skip to content

Commit c41b7c0

Browse files
authored
Fix 0 being treated as an invalid subject ID (#122)
`_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.
1 parent 6c0e885 commit c41b7c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

yakut/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.14.0
1+
0.14.1

yakut/subject_specifier_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async def process_subject_specifier(
4141
sp_sbj_id, sp_dty = specifier.split(":")
4242
_logger.info("Subject specifier interpreted as explicit: %r", (sp_sbj_id, sp_dty))
4343
subject_id = _parse_subject_id(sp_sbj_id)
44-
if not subject_id:
44+
if subject_id is None:
4545
raise BadSpecifierError(f"{subject_id} is not a valid subject-ID")
4646
return subject_id, dtype_loader.load_dtype(sp_dty)
4747

0 commit comments

Comments
 (0)