fix: db.py SQL (<>ALL, escape %% in LIKE) + incremental_sync tz-aware compare

This commit is contained in:
yeuimu
2026-07-23 08:43:27 +00:00
parent d48034f27a
commit 53ff943ac3
3 changed files with 6 additions and 2 deletions
+2
View File
@@ -37,6 +37,8 @@ def upsert_records(raw_orders: list) -> dict:
def riin_incremental_sync() -> dict:
db = SyncDB()
latest = db.get_latest_ordered_at("RIIN")
if latest is not None and latest.tzinfo is not None:
latest = latest.replace(tzinfo=None)
now = datetime.now()
from_dt = floor_to_hour(latest) if latest else floor_to_hour(now)
to_dt = now