Skip to content

Commit da59951

Browse files
committed
fix(github): use proper ISO timestamp instead of literal 'now()' string
_update_last_used was passing string 'now()' which PostgreSQL stores literally instead of evaluating. Now uses datetime.now(timezone.utc).isoformat() for proper timestamp storage.
1 parent 1e046a2 commit da59951

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backend/routes/github.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,11 @@ async def _delete_github_connection(user_id: str) -> bool:
117117
async def _update_last_used(user_id: str) -> None:
118118
"""Update last_used_at timestamp"""
119119
try:
120+
from datetime import datetime, timezone
120121
from services.supabase_service import get_supabase_service
121122
db = get_supabase_service().client
122123
db.table("github_connections").update(
123-
{"last_used_at": "now()"}
124+
{"last_used_at": datetime.now(timezone.utc).isoformat()}
124125
).eq("user_id", user_id).execute()
125126
except Exception:
126127
pass

0 commit comments

Comments
 (0)