fixup foreach

This commit is contained in:
Graham Christensen 2021-10-20 12:42:59 -04:00
parent 327d79bc1d
commit d2f03ca050
2 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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);
}