From 333475a8264af0474e34daf82e7686b8cbac49aa Mon Sep 17 00:00:00 2001 From: ManuelW Date: Sat, 11 May 2024 09:36:15 +0200 Subject: [PATCH] DB config --- insertLoading.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/insertLoading.py b/insertLoading.py index 6967b03..cfa3d7f 100644 --- a/insertLoading.py +++ b/insertLoading.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- from datetime import datetime, timedelta +import sys import sqlite3 @@ -14,6 +15,7 @@ try: watt = sys.argv[2] except: print("Fehlende Command Line Inputs") + exit(0) ## @@ -40,7 +42,7 @@ def updateLast(cursor): ## hole letztes Ladungs-Datum sql = ''' - SELECT id, l_date FROM bike_loading ORDER BY d_date DESC LIMIT 1; + SELECT id, l_date FROM bike_loading ORDER BY l_date DESC LIMIT 1; ''' cursor.execute(sql) row = cursor.fetchone()