Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion psa_car_controller/psacc/repository/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ def get_charge(vin, start_at) -> Charge:

@staticmethod
def get_all_charge_without_price(conn) -> List[Charge]:
res = conn.execute("SELECT * FROM battery WHERE price IS NULL").fetchall()
# Chargings that did not end yet can't have a price
res = conn.execute("SELECT * FROM battery WHERE price IS NULL AND stop_at IS NOT NULL").fetchall()
charges = []
for row in res:
charges.append(Charge(**dict_key_to_lower_case(**row)))
Expand Down