fix: cast feed_id parameter to integer to resolve asyncpg AmbiguousParameterError

This commit is contained in:
2026-03-28 12:56:33 -04:00
parent 7b95150101
commit c77c13684f
+1 -1
View File
@@ -367,7 +367,7 @@ async def list_news():
LEFT JOIN rss_item_reactions r
ON r.rss_item_id = i.id AND r.user_id = :uid
WHERE f.user_id = :uid
AND (:feed_id IS NULL OR f.id = :feed_id)
AND (CAST(:feed_id AS integer) IS NULL OR f.id = CAST(:feed_id AS integer))
AND COALESCE(i.published_at, i.fetched_at) >= NOW() - make_interval(days => :days)
ORDER BY COALESCE(i.published_at, i.fetched_at) DESC
LIMIT :limit OFFSET :offset