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);
|
my $jobset = $project->jobsets->update_or_create(\%update);
|
||||||
$jobset->jobsetinputs->delete;
|
$jobset->jobsetinputs->delete;
|
||||||
foreach my $name (keys %{$declSpec->{"inputs"}}) {
|
foreach my $name (keys %{$declSpec->{"inputs"}}) {
|
||||||
my $data = $declSpec->{"inputs"}{$name};
|
my $data = $declSpec->{"inputs"}->{$name};
|
||||||
my $row = {
|
my $row = {
|
||||||
name => $name,
|
name => $name,
|
||||||
type => $data->{type}
|
type => $data->{type}
|
||||||
|
@ -86,7 +86,7 @@ sub handleDeclarativeJobsetJson {
|
||||||
push @kept, ".jobsets";
|
push @kept, ".jobsets";
|
||||||
$project->jobsets->search({ name => { "not in" => \@kept } })->update({ enabled => 0, hidden => 1 });
|
$project->jobsets->search({ name => { "not in" => \@kept } })->update({ enabled => 0, hidden => 1 });
|
||||||
foreach my $jobsetName (keys %$declSpec) {
|
foreach my $jobsetName (keys %$declSpec) {
|
||||||
my $spec = $declSpec{$jobsetName};
|
my $spec = $declSpec->{$jobsetName};
|
||||||
eval {
|
eval {
|
||||||
updateDeclarativeJobset($db, $project, $jobsetName, $spec);
|
updateDeclarativeJobset($db, $project, $jobsetName, $spec);
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -119,7 +119,7 @@ sub fetchInput {
|
||||||
$name);
|
$name);
|
||||||
# give preference to the options from the input value
|
# give preference to the options from the input value
|
||||||
foreach my $opt_name (keys %{$options}) {
|
foreach my $opt_name (keys %{$options}) {
|
||||||
my $opt_value = $options{$opt_name};
|
my $opt_value = $options->{$opt_name};
|
||||||
if ($opt_value =~ /^[+-]?\d+\z/) {
|
if ($opt_value =~ /^[+-]?\d+\z/) {
|
||||||
$opt_value = int($opt_value);
|
$opt_value = int($opt_value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue