Skip to content

Commit 3c37db6

Browse files
authored
Merge pull request #263 from Crinibus/fix/print_latest_datapoints_for_products
Add if-statement to print if no products found in function 'print_latest_datapoints_for_products'
2 parents b1c2deb + 8c20b68 commit 3c37db6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scraper/print_products.py

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ def print_latest_datapoints(names: list[str], product_codes: list[str], categori
2222

2323

2424
def print_latest_datapoints_for_products(products: list[db.Product]):
25+
if not products:
26+
print("Found no products")
27+
return
28+
2529
grouped_products = db.group_products_by_names(products)
2630

2731
for products in grouped_products:

0 commit comments

Comments
 (0)