diff --git a/fam-core/src/fam_core/db_layer.py b/fam-core/src/fam_core/db_layer.py index 70f18dc..cb99c48 100644 --- a/fam-core/src/fam_core/db_layer.py +++ b/fam-core/src/fam_core/db_layer.py @@ -312,7 +312,7 @@ def get_sync_cursor() -> str: conn = get_conn() try: cur = conn.cursor() - cur.execute("SELECT value FROM sync_cursor WHERE key='last_since'") + cur.execute("SELECT `value` FROM sync_cursor WHERE `key`='last_since'") row = cur.fetchone() return row[0] if row else '' finally: @@ -324,8 +324,8 @@ def set_sync_cursor(value: str): try: cur = conn.cursor() cur.execute( - """INSERT INTO sync_cursor (key, value) VALUES ('last_since', %s) - ON DUPLICATE KEY UPDATE value=VALUES(value)""", + """INSERT INTO sync_cursor (`key`, `value`) VALUES ('last_since', %s) + ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)""", (value,)) conn.commit() finally: