Skip to content

Commit

Permalink
feat: add DISTINCT to wdpa as we don't want duplicate list
Browse files Browse the repository at this point in the history
  • Loading branch information
yuelongh committed Jan 5, 2024
1 parent 6708030 commit 1bc2923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/country.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def protected_areas_per_designation(jurisdictions=[], exclude_oecms: false)
end
def designations_list_by_wdpa_or_oecm(jurisdictions:[], is_oecm: false)
ActiveRecord::Base.connection.execute("""
SELECT protected_areas.wdpa_id, protected_areas.designation_id,protected_areas.name as protected_areas_name,
SELECT DISTINCT protected_areas.wdpa_id, protected_areas.designation_id,protected_areas.name as protected_areas_name,
protected_areas.designation_id,protected_areas.is_oecm, protected_areas.is_dopa,
countries_protected_areas.country_id,designations.jurisdiction_id,
jurisdictions.name as jurisdiction_name
Expand Down

0 comments on commit 1bc2923

Please sign in to comment.