Fixed incorrect kernel display in VM settings

Kernel set to 'None' was incorrectly displayed as 'default'.

fixes QubesOS/qubes-issues#4043
This commit is contained in:
Marta Marczykowska-Górecka 2018-07-16 17:35:35 +02:00
parent 3f0af4498c
commit af5aa233bb
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B

View File

@ -60,6 +60,8 @@ def prepare_choice(widget, holder, propname, choice, default,
oldvalue = qubesadmin.DEFAULT
else:
oldvalue = getattr(holder, propname)
if oldvalue == '':
oldvalue = None
if transform is not None and oldvalue is not None:
oldvalue = transform(oldvalue)
else: