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
|
measurement = data.cache
|
||||||
current_time_utc = datetime.utcnow()
|
current_time_utc = datetime.utcnow()
|
||||||
timestamp = current_time_utc.isoformat()
|
timestamp = current_time_utc.isoformat()
|
||||||
total = measurement["total"]
|
total = measurement.get("total", 0)
|
||||||
tax = measurement["tax"]
|
tax = measurement.get("tax", 0)
|
||||||
tags = {self.label: ""}
|
tags = {self.label: ""}
|
||||||
fields = {
|
fields = {
|
||||||
"total": float(total),
|
"total": float(total),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue