diff --git a/app/models/notification.rb b/app/models/notification.rb index 6d404114788c00..8b77b2a03b2f4c 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -149,7 +149,7 @@ def paginate_groups_by_max_id(limit, max_id: nil, since_id: nil) .with_recursive( grouped_notifications: [ query - .select('notifications.*', "ARRAY[COALESCE(notifications.group_key, 'ungrouped-' || notifications.id)] groups") + .select('notifications.*', "ARRAY[COALESCE(notifications.group_key, 'ungrouped-' || notifications.id)] AS groups") .limit(1), query .joins('CROSS JOIN grouped_notifications') @@ -177,7 +177,7 @@ def paginate_groups_by_min_id(limit, max_id: nil, min_id: nil) .with_recursive( grouped_notifications: [ query - .select('notifications.*', "ARRAY[COALESCE(notifications.group_key, 'ungrouped-' || notifications.id)] groups") + .select('notifications.*', "ARRAY[COALESCE(notifications.group_key, 'ungrouped-' || notifications.id)] AS groups") .limit(1), query .joins('CROSS JOIN grouped_notifications')