Store unset descriptions etc. as nulls

This commit is contained in:
Eelco Dolstra 2015-10-08 12:37:56 +02:00
parent 4b31b23c04
commit d959afebe1

View file

@ -429,13 +429,18 @@ sub checkBuild {
my $time = time(); my $time = time();
sub null {
my ($s) = @_;
return $s eq "" ? undef : $s;
}
# Add the build to the database. # Add the build to the database.
$build = $job->builds->create( $build = $job->builds->create(
{ timestamp => $time { timestamp => $time
, description => $buildInfo->{description} , description => null($buildInfo->{description})
, license => $buildInfo->{license} , license => null($buildInfo->{license})
, homepage => $buildInfo->{homepage} , homepage => null($buildInfo->{homepage})
, maintainers => $buildInfo->{maintainers} , maintainers => null($buildInfo->{maintainers})
, maxsilent => $buildInfo->{maxSilent} , maxsilent => $buildInfo->{maxSilent}
, timeout => $buildInfo->{timeout} , timeout => $buildInfo->{timeout}
, nixname => $buildInfo->{nixName} , nixname => $buildInfo->{nixName}