* [pve-devel] [PATCH flutter_frontend] PveLxcOptions: fix config.unprivileged is null behavior
@ 2020-11-16 13:10 Aaron Lauterer
2020-11-16 17:16 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Lauterer @ 2020-11-16 13:10 UTC (permalink / raw)
To: pve-devel
If config.unprivileged is null we should set it to the default (false)
so the ternary operator evaluates correctly.
Otherwise the LXC options screen shows "Failed assertion: boolean
expression must not be null" if the unprivileged config option is not
present in the config file.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
lib/widgets/pve_lxc_options_widget.dart | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/widgets/pve_lxc_options_widget.dart b/lib/widgets/pve_lxc_options_widget.dart
index f0967fb..cc5b70c 100644
--- a/lib/widgets/pve_lxc_options_widget.dart
+++ b/lib/widgets/pve_lxc_options_widget.dart
@@ -76,7 +76,8 @@ class PveLxcOptions extends StatelessWidget {
),
ListTile(
title: Text("Unprivileged"),
- subtitle: Text(config.unprivileged ? 'Yes' : 'No'),
+ subtitle:
+ Text(config.unprivileged ?? false ? 'Yes' : 'No'),
),
ListTile(
title: Text("Features"),
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH flutter_frontend] PveLxcOptions: fix config.unprivileged is null behavior
2020-11-16 13:10 [pve-devel] [PATCH flutter_frontend] PveLxcOptions: fix config.unprivileged is null behavior Aaron Lauterer
@ 2020-11-16 17:16 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-11-16 17:16 UTC (permalink / raw)
To: Proxmox VE development discussion, Aaron Lauterer
On 16.11.20 14:10, Aaron Lauterer wrote:
> If config.unprivileged is null we should set it to the default (false)
> so the ternary operator evaluates correctly.
>
> Otherwise the LXC options screen shows "Failed assertion: boolean
> expression must not be null" if the unprivileged config option is not
> present in the config file.
>
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> lib/widgets/pve_lxc_options_widget.dart | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-16 17:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 13:10 [pve-devel] [PATCH flutter_frontend] PveLxcOptions: fix config.unprivileged is null behavior Aaron Lauterer
2020-11-16 17:16 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox