as we default to 'enabled' when a service state isn't explicitly set, use this default when returning the config. So default values stay in the package and others which rely on the API don't have to make assumptions.
Fixes bug where the HA ResourceEditor sometimes shows a wrong state enabled checkbox. Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com> --- src/PVE/API2/HA/Resources.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/API2/HA/Resources.pm b/src/PVE/API2/HA/Resources.pm index 354b7b6..f512926 100644 --- a/src/PVE/API2/HA/Resources.pm +++ b/src/PVE/API2/HA/Resources.pm @@ -32,6 +32,7 @@ my $api_copy_config = sub { my $scfg = dclone($cfg->{ids}->{$sid}); $scfg->{sid} = $sid; $scfg->{digest} = $cfg->{digest}; + $scfg->{state} = 'enabled' if !defined($scfg->{state}); return $scfg; }; -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel