diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-18 16:36:14 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-18 16:36:14 +0100 |
| commit | cd12c8e26b6713bf174076dc288b610f890a0588 (patch) | |
| tree | 9033ca3f6625bd89a3afea8c7e0efcccba5d36d7 /models.py | |
| parent | 3a867e3b0c966f84d607fc0ceafb2fdee893ed5d (diff) | |
| download | EgoMetrics-cd12c8e26b6713bf174076dc288b610f890a0588.tar.gz EgoMetrics-cd12c8e26b6713bf174076dc288b610f890a0588.zip | |
Remove note field from weight logging
Diffstat (limited to 'models.py')
| -rw-r--r-- | models.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -261,11 +261,10 @@ def add_weight_log( conn: sqlite3.Connection, date_time: str, weight: float, - note: str | None = None, ) -> int: cur = conn.execute( - "INSERT INTO weight_logs (date_time, weight, note) VALUES (?, ?, ?)", - (date_time, weight, note), + "INSERT INTO weight_logs (date_time, weight) VALUES (?, ?)", + (date_time, weight), ) conn.commit() assert cur.lastrowid is not None @@ -274,7 +273,7 @@ def add_weight_log( def list_weight_logs(conn: sqlite3.Connection, limit: int = 20) -> list[sqlite3.Row]: return conn.execute( - "SELECT id, date_time, weight, note FROM weight_logs ORDER BY date_time DESC LIMIT ?", + "SELECT id, date_time, weight FROM weight_logs ORDER BY date_time DESC LIMIT ?", (limit,), ).fetchall() |
