소스 검색

Merge remote-tracking branch 'qubesos/pr/122'

* qubesos/pr/122:
  And also fixed problem with setting default template to None
  Fixed problem with setting default_dispvm to None in Global Settings
Marek Marczykowski-Górecki 6 년 전
부모
커밋
146ce683f7
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      qubesmanager/global_settings.py

+ 4 - 2
qubesmanager/global_settings.py

@@ -89,7 +89,8 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings,
                 self.default_template_combo,
                 self.qvm_collection, 'default_template',
                 None,
-                filter_function=(lambda vm: vm.klass == 'TemplateVM')
+                filter_function=(lambda vm: vm.klass == 'TemplateVM'),
+                allow_none=True
             )
 
         # default dispvm
@@ -98,7 +99,8 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings,
                 self.default_dispvm_combo,
                 self.qvm_collection, 'default_dispvm',
                 None,
-                (lambda vm: getattr(vm, 'template_for_dispvms', False))
+                (lambda vm: getattr(vm, 'template_for_dispvms', False)),
+                allow_none=True
             )
 
     def __apply_system_defaults__(self):