From 4f8816d696d1eb4774dca3bb837effa85c25fe05 Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Wed, 9 Oct 2024 16:53:38 +0300 Subject: [PATCH] FIX: Match column types (#593) The assignments table's primary key is a bigint. --- lib/discourse_assign/notification_extension.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/discourse_assign/notification_extension.rb b/lib/discourse_assign/notification_extension.rb index ddb7e258..c8100fa3 100644 --- a/lib/discourse_assign/notification_extension.rb +++ b/lib/discourse_assign/notification_extension.rb @@ -8,7 +8,7 @@ module NotificationExtension scope :assigned, -> { where(notification_type: Notification.types[:assigned]) } scope :for_assignment, ->(assignment) do - assigned.where("((data::jsonb)->'assignment_id')::int IN (?)", assignment) + assigned.where("((data::jsonb)->'assignment_id')::bigint IN (?)", assignment) end end end