Ver Fonte

Fixed incorrect kernel display in VM settings

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

fixes QubesOS/qubes-issues#4043
Marta Marczykowska-Górecka há 6 anos atrás
pai
commit
af5aa233bb
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      qubesmanager/utils.py

+ 2 - 0
qubesmanager/utils.py

@@ -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: