diff --git a/apps/api/src/repositories/drift_repository.py b/apps/api/src/repositories/drift_repository.py index 4976577b..12550fdc 100644 --- a/apps/api/src/repositories/drift_repository.py +++ b/apps/api/src/repositories/drift_repository.py @@ -92,7 +92,7 @@ class DriftReportRepository: VALUES (:report_id, :namespace, :triggered_by, :scanned_at, :high_count, :medium_count, :info_count, - :items::jsonb, :interpretation::jsonb, :status, :created_at, :resolved_at) + CAST(:items AS jsonb), CAST(:interpretation AS jsonb), :status, :created_at, :resolved_at) ON CONFLICT (report_id) DO UPDATE SET items = EXCLUDED.items, interpretation = EXCLUDED.interpretation, @@ -144,7 +144,7 @@ class DriftReportRepository: await db.execute( text(""" UPDATE drift_reports - SET interpretation = :interpretation::jsonb + SET interpretation = CAST(:interpretation AS jsonb) WHERE report_id = :report_id """), {