From 87928932c2136018533556fd0e220742e63efb22 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Tue, 5 Nov 2024 10:27:06 -0500 Subject: [PATCH] Update download URL for countries JSON to use tagged version --- .../worldtravel/management/commands/download-countries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/server/worldtravel/management/commands/download-countries.py b/backend/server/worldtravel/management/commands/download-countries.py index c9dff83..3339ec8 100644 --- a/backend/server/worldtravel/management/commands/download-countries.py +++ b/backend/server/worldtravel/management/commands/download-countries.py @@ -40,7 +40,7 @@ class Command(BaseCommand): def handle(self, *args, **options): countries_json_path = os.path.join(settings.MEDIA_ROOT, f'countries+regions-{COUNTRY_REGION_JSON_VERSION}.json') if not os.path.exists(countries_json_path): - res = requests.get(f'https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/{COUNTRY_REGION_JSON_VERSION}/countries%2Bstates.json') + res = requests.get(f'https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/refs/tags/{COUNTRY_REGION_JSON_VERSION}/json/countries%2Bstates.json') if res.status_code == 200: with open(countries_json_path, 'w') as f: f.write(res.text)