From c523bdf1311efecf9ac9f3f4440435a947cc46d3 Mon Sep 17 00:00:00 2001 From: Edie Pearce Date: Wed, 5 Feb 2020 13:48:19 +0000 Subject: [PATCH] Fix country guide cta link migration --- export_readiness/migrations/0073_auto_20200203_1333.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/export_readiness/migrations/0073_auto_20200203_1333.py b/export_readiness/migrations/0073_auto_20200203_1333.py index a8d8d6c2..1ef8bd0c 100644 --- a/export_readiness/migrations/0073_auto_20200203_1333.py +++ b/export_readiness/migrations/0073_auto_20200203_1333.py @@ -20,6 +20,8 @@ def set_duties_and_custom_procedures_cta_link(apps, schema_editor): matches = pycountry.countries.search_fuzzy(guide.country.name) except LookupError: logger.warn(f'no country match for {guide.country.name}') + except AttributeError: + logger.warn(f'skipping {guide.title}') else: guide.duties_and_custom_procedures_cta_link = f'{url}{matches[0].alpha_2}' guide.save()