Skip to content

Commit

Permalink
null check on input data
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Dec 11, 2024
1 parent 01ec4a9 commit 790dd4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion reg_chxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
logger.remove()
logger.add(sys.stderr, format=logger_format)

__version__ = '1.0.1'
__version__ = '1.0.2'

DISPLAY_TITLE = r"""
_ _
Expand Down Expand Up @@ -105,6 +105,10 @@ def main(options: Namespace, inputdir: Path, outputdir: Path):
with open(input_file, 'r') as file:
data = json.load(file)

# null check
if len(data) == 0:
raise Exception(f"Cannot verify registration for empty pacs data.")

# for each individual series, check if total file count matches total file registered
for series in data:
pacs_search_params = sanitize_for_cube(series)
Expand Down

0 comments on commit 790dd4f

Please sign in to comment.