[pve-devel] [PATCH pve-flutter-frontend 10/10] fix options view when ostype is null
Dominik Csapak
d.csapak at proxmox.com
Thu Sep 8 11:55:50 CEST 2022
can happen when no ostype is set in the config (defaults to 'other')
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
lib/widgets/pve_qemu_options_widget.dart | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/widgets/pve_qemu_options_widget.dart b/lib/widgets/pve_qemu_options_widget.dart
index 788923d..cd32cff 100644
--- a/lib/widgets/pve_qemu_options_widget.dart
+++ b/lib/widgets/pve_qemu_options_widget.dart
@@ -53,7 +53,10 @@ class PveQemuOptions extends StatelessWidget {
ListTile(
title: Text("OS Type"),
subtitle: Text(
- "${config.ostype!.type} ${config.ostype!.description}"),
+ config.ostype != null ?
+ "${config.ostype!.type} ${config.ostype!.description}" :
+ "Other"
+ ),
),
//TODO add better ui component e.g. collapseable
ListTile(
--
2.30.2
More information about the pve-devel
mailing list