forked from lix-project/hydra
fixup foreach
This commit is contained in:
parent
327d79bc1d
commit
d2f03ca050
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue