Merge pull request #2730 from mempool/nymkappa/bugfix/node-map

Don't select nodes which do not have country info
This commit is contained in:
wiz 2022-12-01 17:13:12 +09:00 committed by GitHub
commit 2b411aad0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,8 +14,8 @@ class NodesApi {
nodes.longitude, nodes.latitude, nodes.longitude, nodes.latitude,
geo_names_country.names as country, geo_names_iso.names as isoCode geo_names_country.names as country, geo_names_iso.names as isoCode
FROM nodes FROM nodes
LEFT JOIN geo_names geo_names_country ON geo_names_country.id = nodes.country_id AND geo_names_country.type = 'country' JOIN geo_names geo_names_country ON geo_names_country.id = nodes.country_id AND geo_names_country.type = 'country'
LEFT JOIN geo_names geo_names_iso ON geo_names_iso.id = nodes.country_id AND geo_names_iso.type = 'country_iso_code' JOIN geo_names geo_names_iso ON geo_names_iso.id = nodes.country_id AND geo_names_iso.type = 'country_iso_code'
WHERE status = 1 AND nodes.as_number IS NOT NULL WHERE status = 1 AND nodes.as_number IS NOT NULL
ORDER BY capacity ORDER BY capacity
`; `;