Skip to content

Commit

Permalink
Use the first parent as the default when updating section data
Browse files Browse the repository at this point in the history
Fixes #5998
  • Loading branch information
jrouzierinverse committed Nov 24, 2020
1 parent 10b9d77 commit cb5684d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/pf/ConfigStore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ sub update {
sub _update_section {
my ($self, $section, $assignments) = @_;
my $config = $self->cachedConfig;
my $default_section = $self->default_section if defined($self->default_section);
my @parentSections = $self->parentSections($section, $assignments);
my $default_section = $parentSections[0];
my $imported = $config->{imported} if exists $config->{imported};
my $use_default = $default_section && $section ne $default_section;
while ( my ($param, $value) = each %$assignments ) {
Expand Down

0 comments on commit cb5684d

Please sign in to comment.