Skip to content

Commit

Permalink
Merge pull request #263 from Crinibus/fix/print_latest_datapoints_for…
Browse files Browse the repository at this point in the history
…_products

Add if-statement to print if no products found in function 'print_latest_datapoints_for_products'
  • Loading branch information
Crinibus authored Jan 29, 2025
2 parents b1c2deb + 8c20b68 commit 3c37db6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scraper/print_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def print_latest_datapoints(names: list[str], product_codes: list[str], categori


def print_latest_datapoints_for_products(products: list[db.Product]):
if not products:
print("Found no products")
return

grouped_products = db.group_products_by_names(products)

for products in grouped_products:
Expand Down

0 comments on commit 3c37db6

Please sign in to comment.