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);
|
||||
$jobset->jobsetinputs->delete;
|
||||
while ((my $name, my $data) = each %{$declSpec->{"inputs"}}) {
|
||||
my $input = $jobset->jobsetinputs->create(
|
||||
{ name => $name,
|
||||
type => $data->{type},
|
||||
emailresponsible => $data->{emailresponsible}
|
||||
});
|
||||
my $row = {
|
||||
name => $name,
|
||||
type => $data->{type}
|
||||
};
|
||||
$row->{emailresponsible} = $data->{emailresponsible} if defined $data->{emailresponsible};
|
||||
my $input = $jobset->jobsetinputs->create($row);
|
||||
$input->jobsetinputalts->create({altnr => 0, value => $data->{value}});
|
||||
}
|
||||
delete $declSpec->{"inputs"};
|
||||
|
|
Loading…
Reference in a new issue