File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -503,7 +503,7 @@ def get_territory_name(self, locale: Locale | str | None = None) -> str | None:
503503 if locale is None :
504504 locale = self
505505 locale = Locale .parse (locale )
506- return locale .territories .get (self .territory )
506+ return locale .territories .get (self .territory or '' )
507507
508508 territory_name = property (get_territory_name , doc = """\
509509 The localized territory name of the locale if available.
@@ -517,7 +517,7 @@ def get_script_name(self, locale: Locale | str | None = None) -> str | None:
517517 if locale is None :
518518 locale = self
519519 locale = Locale .parse (locale )
520- return locale .scripts .get (self .script )
520+ return locale .scripts .get (self .script or '' )
521521
522522 script_name = property (get_script_name , doc = """\
523523 The localized script name of the locale if available.
You can’t perform that action at this time.
0 commit comments