From 697ffa7e05b669b2196b83dc8321c3fdc46bd280 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Thu, 6 Aug 2020 18:38:20 +0100 Subject: [PATCH] CoRemove UNION query to download exactly what is shown on the site --- app/models/pame_evaluation.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/pame_evaluation.rb b/app/models/pame_evaluation.rb index 1ad02e853..d417c2b14 100644 --- a/app/models/pame_evaluation.rb +++ b/app/models/pame_evaluation.rb @@ -245,7 +245,7 @@ def self.generate_csv(where_statement, restricted_where_statement) GROUP BY pame_evaluations.id, protected_areas.wdpa_id, protected_areas.name, designation, pame_sources.data_title, pame_sources.resp_party, pame_sources.year, pame_sources.language - UNION + /* UNION SELECT pame_evaluations.id AS id, pame_evaluations.metadata_id AS metadata_id, @@ -267,6 +267,7 @@ def self.generate_csv(where_statement, restricted_where_statement) #{restricted_where_statement} GROUP BY pame_evaluations.id, wdpa_id, pame_evaluations.name, designation, pame_sources.data_title, pame_sources.resp_party, pame_sources.year, pame_sources.language; + */ SQL evaluations = ActiveRecord::Base.connection.execute(query)