Update DataPoints.py
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 59s
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 59s
fix: udate price accessing to handle nulls
This commit is contained in:
parent
a03df231f4
commit
0d62cf11e4
1 changed files with 2 additions and 2 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue