forked from lix-project/hydra
updateDeclarativeJobset: only set the emailresponsible column when defined (#788)
This commit is contained in:
parent
7985757a1d
commit
48678df8b6
|
@ -52,11 +52,12 @@ sub updateDeclarativeJobset {
|
||||||
my $jobset = $project->jobsets->update_or_create(\%update);
|
my $jobset = $project->jobsets->update_or_create(\%update);
|
||||||
$jobset->jobsetinputs->delete;
|
$jobset->jobsetinputs->delete;
|
||||||
while ((my $name, my $data) = each %{$declSpec->{"inputs"}}) {
|
while ((my $name, my $data) = each %{$declSpec->{"inputs"}}) {
|
||||||
my $input = $jobset->jobsetinputs->create(
|
my $row = {
|
||||||
{ name => $name,
|
name => $name,
|
||||||
type => $data->{type},
|
type => $data->{type}
|
||||||
emailresponsible => $data->{emailresponsible}
|
};
|
||||||
});
|
$row->{emailresponsible} = $data->{emailresponsible} if defined $data->{emailresponsible};
|
||||||
|
my $input = $jobset->jobsetinputs->create($row);
|
||||||
$input->jobsetinputalts->create({altnr => 0, value => $data->{value}});
|
$input->jobsetinputalts->create({altnr => 0, value => $data->{value}});
|
||||||
}
|
}
|
||||||
delete $declSpec->{"inputs"};
|
delete $declSpec->{"inputs"};
|
||||||
|
|
Loading…
Reference in a new issue