fix: replace all :: type casts with CAST() in SQLAlchemy text() calls
SQLAlchemy's text() interprets :name::type as two named parameters. Fixes syntax errors in link discovery, signal history, and SNMP profile CRUD that caused 500 errors at runtime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,7 @@ async def get_signal_history(
|
||||
WHERE wr.mac_address = :mac_address
|
||||
AND wr.device_id = :device_id
|
||||
AND wr.tenant_id = :tenant_id
|
||||
AND wr.time > now() - :lookback::interval
|
||||
AND wr.time > now() - CAST(:lookback AS interval)
|
||||
AND wr.signal_strength IS NOT NULL
|
||||
GROUP BY bucket
|
||||
ORDER BY bucket
|
||||
|
||||
Reference in New Issue
Block a user