updateSchema: code cleanup - avoid assigning same value multiple times

This commit is contained in:
Dietmar Maurer 2015-09-17 17:45:59 +02:00
parent 952fd95e84
commit 516dfb55e1

View File

@ -75,13 +75,17 @@ sub updateSchema {
$props->{$p} = $propertyList->{$p};
next;
}
my $modifyable = 0;
foreach my $t (keys %$plugins) {
my $opts = $pdata->{options}->{$t};
my $opts = $pdata->{options}->{$t} || {};
next if !defined($opts->{$p});
if (!$opts->{$p}->{fixed}) {
$props->{$p} = $propertyList->{$p};
}
$modifyable = 1 if !$opts->{$p}->{fixed};
}
next if !$modifyable;
$props->{$p} = $propertyList->{$p};
}
$props->{digest} = get_standard_option('pve-config-digest');