From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH flutter_frontend 4/4] power settings: fix handling null for template status
Date: Wed, 23 Jun 2021 12:04:44 +0200 [thread overview]
Message-ID: <20210623100444.1440650-5-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20210623100444.1440650-1-a.lauterer@proxmox.com>
The template status of a guest can be null and we need to catch it.
This patch aligns that with all the other instances where we do check
the template status.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
lib/widgets/pve_qemu_power_settings_widget.dart | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/widgets/pve_qemu_power_settings_widget.dart b/lib/widgets/pve_qemu_power_settings_widget.dart
index 65b3c0c..1c1d2ed 100644
--- a/lib/widgets/pve_qemu_power_settings_widget.dart
+++ b/lib/widgets/pve_qemu_power_settings_widget.dart
@@ -26,7 +26,7 @@ class PveQemuPowerSettings extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: <Widget>[
if (qemuStatus == PveResourceStatusType.stopped &&
- !state.currentStatus.template)
+ !(state.currentStatus.template ?? false))
ListTile(
leading: Icon(Icons.play_arrow),
title: Text(
@@ -41,7 +41,7 @@ class PveQemuPowerSettings extends StatelessWidget {
PveResourceStatusType.paused,
PveResourceStatusType.suspended
].contains(qemuStatus) &&
- !state.currentStatus.template)
+ !(state.currentStatus.template ?? false))
ListTile(
leading: Icon(Icons.play_arrow),
title: Text(
--
2.30.2
next prev parent reply other threads:[~2021-06-23 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 10:04 [pve-devel] [PATCH series/flutter 0/4] fixes related to PVE 7 Aaron Lauterer
2021-06-23 10:04 ` [pve-devel] [PATCH dart_api_client 1/4] Add string serializer to handle int and double values Aaron Lauterer
2021-06-23 10:04 ` [pve-devel] [PATCH dart_api_client 2/4] Add int serializer to handle string values Aaron Lauterer
2021-06-23 10:04 ` [pve-devel] [PATCH dart_api_client 3/4] Add double serializer to handle String and int values Aaron Lauterer
2021-06-23 10:04 ` Aaron Lauterer [this message]
2021-06-23 11:36 ` [pve-devel] applied-series: [PATCH series/flutter 0/4] fixes related to PVE 7 Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210623100444.1440650-5-a.lauterer@proxmox.com \
--to=a.lauterer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal