Missing raise_for_status for Sligro price retrieval

This commit is contained in:
polyfloyd 2025-04-21 11:13:47 +02:00
parent a13bfa52e7
commit 334906bbf3

View file

@ -120,6 +120,7 @@ def sligro_get_by_gtin(gtin13):
# Pricing requires logging in and is on a separate endpoint... # Pricing requires logging in and is on a separate endpoint...
pricing_resp = sligro_client().get(f'https://www.sligro.nl/api/cart/sligro-nl/customerorganizationdatas?productCodes={sku}') pricing_resp = sligro_client().get(f'https://www.sligro.nl/api/cart/sligro-nl/customerorganizationdatas?productCodes={sku}')
pricing_resp.raise_for_status()
pricing = pricing_resp.json()['data']['products'][0] pricing = pricing_resp.json()['data']['products'][0]
# If fromPrice is present, this product has a temporary discount. We prefer the regular price as # If fromPrice is present, this product has a temporary discount. We prefer the regular price as