Only set presets if presets are given. We should probably fix tghis in selection_menu.py line 636. But this solves an issue with broken harddrive selection for now.

This commit is contained in:
Anton Hvornum 2022-02-28 17:10:28 +01:00
parent 35a19a616a
commit 5cf3fbfb41
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 6 additions and 1 deletions

View File

@ -963,7 +963,12 @@ def select_harddrives(preset : List[str] = []) -> List[str]:
"""
hard_drives = all_blockdevices(partitions=False).values()
options = {f'{option}': option for option in hard_drives}
preset_disks = {f'{option}':option for option in preset}
if preset:
preset_disks = {f'{option}':option for option in preset}
else:
preset_disks = {}
selected_harddrive = Menu(
_('Select one or more hard drives to use and configure'),
list(options.keys()),