]> git.proxmox.com Git - pve-cluster.git/blobdiff - data/PVE/Cluster.pm
datacenter: only print properties to string if not already
[pve-cluster.git] / 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);
     }