From c09ccda6ea05113cb6cf18bb3b78b08e5d3eed51 Mon Sep 17 00:00:00 2001 From: Caio <117518+caiosba@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:18:12 -0300 Subject: [PATCH] Ticket CV2-5067: Another minor fix for the data export --- lib/list_export.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/list_export.rb b/lib/list_export.rb index 6a55ab027..533f74771 100644 --- a/lib/list_export.rb +++ b/lib/list_export.rb @@ -7,7 +7,7 @@ def initialize(type, query, team_id) @parsed_query = JSON.parse(@query).with_indifferent_access @team_id = team_id @team = Team.find(team_id) - @feed = Feed.where(id: @parsed_query['feed_id'], team_id: @team_id).last if type == :feed + @feed = Feed.find(@parsed_query['feed_id']) if type == :feed && @team.is_part_of_feed?(Feed.find(@parsed_query['feed_id'])) raise "Invalid export type '#{type}'. Should be one of: #{TYPES}" unless TYPES.include?(type) end