From 9d8e28f0e1862d6ad0ca7562bf3199a2611729eb Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 28 Apr 2022 00:17:26 +0200 Subject: [PATCH] Sort country codes --- shiftregister/app/dynamic_preferences_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shiftregister/app/dynamic_preferences_registry.py b/shiftregister/app/dynamic_preferences_registry.py index 0f80a2d..d9f412e 100644 --- a/shiftregister/app/dynamic_preferences_registry.py +++ b/shiftregister/app/dynamic_preferences_registry.py @@ -12,7 +12,7 @@ class AllowedPhoneCountries(types.MultipleChoicePreference): name = "allowed_countries" choices = [ (f"{phonenumbers.country_code_for_region(cc)}", cc) - for cc in phonenumbers.SUPPORTED_REGIONS + for cc in sorted(phonenumbers.SUPPORTED_REGIONS) ] default = [49, 41, 43]