Fix trip page that crashes when showing Unicode Kosovo flag
Closes: #139
This commit is contained in:
parent
4ebb08f68e
commit
9d691bee40
|
@ -32,7 +32,9 @@ def get_country(alpha_2: str) -> pycountry.db.Country | None:
|
|||
if not alpha_2:
|
||||
return None
|
||||
if alpha_2 == "xk":
|
||||
return pycountry.db.Country(flag="\U0001F1FD\U0001F1F0", name="Kosovo")
|
||||
return pycountry.db.Country(
|
||||
flag="\U0001F1FD\U0001F1F0", name="Kosovo", alpha_2="xk"
|
||||
)
|
||||
|
||||
country: pycountry.db.Country
|
||||
if len(alpha_2) == 2:
|
||||
|
|
Loading…
Reference in a new issue