This commit is contained in:
Jamie Cameron
2023-12-09 12:42:39 -08:00
parent 3b65ec28ed
commit 409a4fbb7b

View File

@@ -1848,10 +1848,6 @@ sub create_slave_zone
{
my $parent = &get_config_parent();
my $conf = $parent->{'members'};
my $opts = &find("options", $conf);
if (!$opts) {
return 1;
}
# Check if exists in the view
my @zones;
@@ -1945,9 +1941,6 @@ my ($name, $slaves, $viewname, $file, $records) = @_;
my $parent = &get_config_parent();
my $conf = $parent->{'members'};
my $opts = &find("options", $conf);
if (!$opts) {
return 1;
}
# Check if exists in the view
my @zones;
@@ -1989,7 +1982,7 @@ foreach my $s (@$slaves) {
push(@transfer, { 'name' => $s });
}
if (@transfer) {
my $gat = &find("allow-transfer", $opts->{'members'});
my $gat = $opts ? &find("allow-transfer", $opts->{'members'}) : undef;
if ($gat) {
push(@transfer, @{$gat->{'members'}});
}