]> git.proxmox.com Git - pve-cluster.git/commitdiff
datacenter: only print properties to string if not already
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Apr 2019 13:45:21 +0000 (15:45 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Apr 2019 13:45:21 +0000 (15:45 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/PVE/Cluster.pm

index 04ff61c1dae31cb25a32240fc7d385b2b912b0f4..2311e7c6b0b1387716b709fae528d2f6356a4e98 100644 (file)
@@ -1537,11 +1537,13 @@ sub write_datacenter_config {
        $cfg->{console} = 'html5';
     }
 
-    if (my $migration = $cfg->{migration}) {
+    if (ref($cfg->{migration})) {
+       my $migration = $cfg->{migration};
        $cfg->{migration} = PVE::JSONSchema::print_property_string($migration, $migration_format);
     }
 
-    if (my $ha = $cfg->{ha}) {
+    if (ref($cfg->{ha})) {
+       my $ha = $cfg->{ha};
        $cfg->{ha} = PVE::JSONSchema::print_property_string($ha, $ha_format);
     }