Sets with the prefilled language before starting controllers

TUI client was able to GET() the language before it was set with the prefilled option in production
This commit is contained in:
Carlos Nihelton 2022-04-20 09:10:21 -03:00
parent 30745e522f
commit 8201e917c3
No known key found for this signature in database
GPG Key ID: 6FE346D245197E9A
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,8 @@ log = logging.getLogger('system_setup.server.controllers.locale')
class WSLLocaleController(LocaleController):
def start(self):
def __init__(self, app):
super().__init__(app)
if self.app.prefillInfo:
welcome = self.app.prefillInfo.get('Welcome', {'lang': None})
win_lang = welcome.get('lang')
@ -29,4 +30,3 @@ class WSLLocaleController(LocaleController):
log.debug('Prefilled Language: {}'
.format(self.model.selected_language))
super().start()