diff --git a/.circleci/config.yml b/.circleci/config.yml index 103a55472f..832d6f80cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -348,6 +348,7 @@ workflows: branches: only: - free + - fix-country-setting-page # This is alternate dev env for parallel testing - "build-qa": context : org-global @@ -368,7 +369,7 @@ workflows: filters: &filters-staging branches: only: - - fix-env-value-issuer + - develop # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration diff --git a/src/shared/components/Settings/Profile/BasicInfo/index.jsx b/src/shared/components/Settings/Profile/BasicInfo/index.jsx index e1379030dc..aa7e8c9711 100644 --- a/src/shared/components/Settings/Profile/BasicInfo/index.jsx +++ b/src/shared/components/Settings/Profile/BasicInfo/index.jsx @@ -95,6 +95,16 @@ export default class BasicInfo extends ConsentComponent { inputChanged: false, }); } + if (nextProps.lookupData) { + const { countries } = nextProps.lookupData; + const { newBasicInfo } = this.state; + if (!newBasicInfo.country) { + const code = newBasicInfo.homeCountryCode || newBasicInfo.competitionCountryCode; + const { country } = countries.find(c => c.countryCode === code) || {}; + newBasicInfo.country = country; + this.setState({ newBasicInfo }); + } + } } onCheckFormValue(newBasicInfo) {