diff --git a/DataPoints.py b/DataPoints.py index 6ce07b6..724e99e 100755 --- a/DataPoints.py +++ b/DataPoints.py @@ -30,8 +30,8 @@ class Price: measurement = data.cache current_time_utc = datetime.utcnow() timestamp = current_time_utc.isoformat() - total = measurement["total"] - tax = measurement["tax"] + total = measurement.get("total", 0) + tax = measurement.get("tax", 0) tags = {self.label: ""} fields = { "total": float(total),