diff --git a/fastfood/service/summary.py b/fastfood/service/summary.py index 735c53f..b5cddef 100644 --- a/fastfood/service/summary.py +++ b/fastfood/service/summary.py @@ -42,7 +42,10 @@ class SummaryService: discont = await self.cache.get(f"DISCONT:{str(obj.get('id'))}") if discont is not None: - discont = float(discont) + try: + discont = float(discont) + except Exception: + discont = 0.0 obj['price'] = round( obj['price'] - (obj['price'] * discont / 100), 2 )