Address form: Add missing province Aosta for Italy (#5796) (#5800)

This commit is contained in:
Raphael Michel
2026-01-26 10:00:11 +01:00
committed by GitHub
parent 7fb9e9a33d
commit 4edc7d95c6
2 changed files with 17 additions and 2 deletions

View File

@@ -136,3 +136,16 @@ custom_translations = [
gettext_noop("North Macedonia"),
gettext_noop("Macao"),
]
def pycountry_add(db, **kw):
# Workaround for https://github.com/pycountry/pycountry/issues/281
db._load()
obj = db.factory(**kw)
db.objects.append(obj)
for key, value in kw.items():
if key in db.no_index:
continue
value = value.lower()
index = db.indices.setdefault(key, {})
index.setdefault(value, set()).add(obj)