From c1aaaf398ded665c37e48c136e5193ffa0ee0163 Mon Sep 17 00:00:00 2001 From: CodeShakingSheep <19874562+CodeShakingSheep@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:12:26 +0100 Subject: [PATCH] Update upgrade Fix upgrading with from installation with no default locale --- scripts/upgrade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index c90efd9..02c24ba 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -143,6 +143,10 @@ then # Fix warning "Your installation has no default phone region set" if [ "$(exec_occ config:system:get default_phone_region)" == "" ]; then config_locale=$(exec_occ config:system:get default_locale) + if [ "$config_locale" == "" ]; then + # If it's not set in config use "US" as default + config_locale="US" + fi country=$(echo "$config_locale" | awk -F'_' '{print $2}') exec_occ config:system:set default_phone_region --value="$country" fi