Stop violating not null constraint

Fixes this error:

ERROR: failed to process declarative jobset test:inputs,
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
execute failed: ERROR:  null value in column "emailoverride" violates
not-null constraint
This commit is contained in:
Janne Heß 2020-09-13 14:39:35 +02:00
parent 8f683aa7f8
commit bd0ab9a5fb
No known key found for this signature in database
GPG key ID: 69165158F05265DF

View file

@ -57,7 +57,7 @@ sub updateDeclarativeJobset {
name => $name,
type => $data->{type}
};
$row->{emailresponsible} = $data->{emailresponsible} if defined $data->{emailresponsible};
$row->{emailresponsible} = $data->{emailresponsible} // 0;
my $input = $jobset->jobsetinputs->create($row);
$input->jobsetinputalts->create({altnr => 0, value => $data->{value}});
}