Sets WslSetupOptions as an optional controller

We have strong defaults, so the clients should only need to POST if
the desired options are not the default ones.
This commit is contained in:
Carlos Nihelton 2022-08-29 09:04:06 -03:00
parent 1bf562c85a
commit 86d19c6259
No known key found for this signature in database
GPG Key ID: 6FE346D245197E9A
1 changed files with 3 additions and 1 deletions

View File

@ -46,12 +46,14 @@ class WSLSetupOptionsController(SubiquityController):
# load the config file
data = default_loader()
conf_data = WSLSetupOptions()
if data:
proc_data = \
{key: convert_if_bool(value) for (key, value) in data.items()}
conf_data = WSLSetupOptions(**proc_data)
self.model.apply_settings(conf_data)
self.model.apply_settings(conf_data)
def load_autoinstall_data(self, data):
if data is not None: