Skip to content

Commit

Permalink
feat: remove other stocks from TradeView filters
Browse files Browse the repository at this point in the history
  • Loading branch information
pdl committed Apr 18, 2024
1 parent 64245c7 commit bbc11b1
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/modules/trade/trade_plus_filters.rb
Expand Up @@ -36,8 +36,21 @@ def country_query
SELECT id,name_#{locale},iso_code2
FROM geo_entities
WHERE geo_entity_type_id IN (1,4,7) --(1,4,7) this is to include both countries, territories and trade entities
AND id NOT IN (218,221,277,278,279) --this is to exclude TW(included into CH), Sudan prior secession, North and South Atlantic stock and All stocks
AND id NOT IN (
-- this is to exclude
218, -- Taiwan (included into China)
221, -- Sudan prior to secession
)
-- The following have null or empty iso2 codes:
--
-- North Atlantic stock
-- South Atlantic stock
-- All stocks
-- Indian Ocean stock
-- Mediterranean stock
--
-- others may follow
AND iso_code2 != ''
)
SELECT 'countries' AS attribute_name, json_build_object('id', id, 'name', name_#{locale}, 'iso2', iso_code2)::jsonb AS data
FROM country_data
Expand Down

0 comments on commit bbc11b1

Please sign in to comment.