From 26d15adcdf64291b744928dd973c409e4c4accd4 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 8 Oct 2021 10:27:29 +1300 Subject: [PATCH] fix SourceController.run_answers for https://bugs.launchpad.net/subiquity/+bug/1946398 --- subiquity/client/controllers/source.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subiquity/client/controllers/source.py b/subiquity/client/controllers/source.py index c0ce37a7d..7c212d10c 100644 --- a/subiquity/client/controllers/source.py +++ b/subiquity/client/controllers/source.py @@ -31,7 +31,9 @@ async def make_ui(self): def run_answers(self): if 'source' in self.answers: - self.app.ui.body.form.source.value = self.answers['source'] + wanted_id = self.answers['source'] + for bf in self.app.ui.body.form._fields: + bf.value = bf.field.name == wanted_id self.app.ui.body.form._click_done(None) def cancel(self):