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:
Jason Staack
2026-03-21 23:59:20 -05:00
parent 2fff669cc3
commit e152c741e5
3 changed files with 6 additions and 6 deletions

View File

@@ -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