Skip to content

Commit

Permalink
CoRemove UNION query to download exactly what is shown on the site
Browse files Browse the repository at this point in the history
  • Loading branch information
Levia committed Aug 6, 2020
1 parent c0ad54f commit 697ffa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/pame_evaluation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)

Expand Down

0 comments on commit 697ffa7

Please sign in to comment.