Skip to content

Commit

Permalink
Merge pull request #783 from uktrade/fix-country-cta-link-migration
Browse files Browse the repository at this point in the history
Fix country guide cta link migration
  • Loading branch information
richtier authored Feb 5, 2020
2 parents f3b9ed1 + c523bdf commit 92af298
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions export_readiness/migrations/0073_auto_20200203_1333.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 92af298

Please sign in to comment.