From d2f03ca0509526fb7e2b983f2551773b579736cf Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 20 Oct 2021 12:42:59 -0400 Subject: [PATCH] fixup foreach --- src/lib/Hydra/Helper/AddBuilds.pm | 4 ++-- src/lib/Hydra/Plugin/GitInput.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 1fc6adf2..1e6d8944 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -65,7 +65,7 @@ sub updateDeclarativeJobset { my $jobset = $project->jobsets->update_or_create(\%update); $jobset->jobsetinputs->delete; foreach my $name (keys %{$declSpec->{"inputs"}}) { - my $data = $declSpec->{"inputs"}{$name}; + my $data = $declSpec->{"inputs"}->{$name}; my $row = { name => $name, type => $data->{type} @@ -86,7 +86,7 @@ sub handleDeclarativeJobsetJson { push @kept, ".jobsets"; $project->jobsets->search({ name => { "not in" => \@kept } })->update({ enabled => 0, hidden => 1 }); foreach my $jobsetName (keys %$declSpec) { - my $spec = $declSpec{$jobsetName}; + my $spec = $declSpec->{$jobsetName}; eval { updateDeclarativeJobset($db, $project, $jobsetName, $spec); 1; diff --git a/src/lib/Hydra/Plugin/GitInput.pm b/src/lib/Hydra/Plugin/GitInput.pm index 02aa430d..99d397a6 100644 --- a/src/lib/Hydra/Plugin/GitInput.pm +++ b/src/lib/Hydra/Plugin/GitInput.pm @@ -119,7 +119,7 @@ sub fetchInput { $name); # give preference to the options from the input value foreach my $opt_name (keys %{$options}) { - my $opt_value = $options{$opt_name}; + my $opt_value = $options->{$opt_name}; if ($opt_value =~ /^[+-]?\d+\z/) { $opt_value = int($opt_value); }