From 777719df07a1eed93d0210ea5d86c89232159cf7 Mon Sep 17 00:00:00 2001 From: mandalkam Date: Mon, 30 Sep 2024 15:40:42 +0200 Subject: [PATCH] Fix initial range of progress bar if no custom limit --- home/fhirvalidation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/home/fhirvalidation.py b/home/fhirvalidation.py index a78ecd0..5898b9c 100644 --- a/home/fhirvalidation.py +++ b/home/fhirvalidation.py @@ -114,14 +114,14 @@ class Validator(): if (page == 1): total = bundle_dict.get('total') - if total == None: + if total is None: total = 0 logging.info(f"Found {total} resources") - if limit < total: - progressbar_total = limit - else: - progressbar_total = total + progressbar_total = total + if limit > 0: + if limit < total: + progressbar_total = limit progress_bar = tqdm(total=progressbar_total, desc="Validating")