Skip to content

Commit

Permalink
Fixed key error for get_power_data_obj
Browse files Browse the repository at this point in the history
  • Loading branch information
jmadden173 committed Feb 25, 2024
1 parent e014615 commit 8018a42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/api/database/models/power_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def get_power_data_obj(
# expected units are mV, uA, and uW
adj_units = db.select(
stmt.c.ts.label("ts"),
stmt.c.voltage.label("voltage") * 1e-3,
stmt.c.current.label("current") * 1e-6,
(stmt.c.voltage * 1e-3).label("voltage"),
(stmt.c.current * 1e-6).label("current"),
(stmt.c.voltage * stmt.c.current * 1e-6).label("power")
).order_by(stmt.c.ts)

Expand Down

0 comments on commit 8018a42

Please sign in to comment.