Build.pm: Don't get isChannel using buildproducts.

We now have a column for that, so no need for counting rows which was a
bit inefficient anyway, because we only would have needed the first row
in the result.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2015-04-21 08:09:25 +02:00
parent ba7402ed6c
commit ed361a0145
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961
2 changed files with 3 additions and 7 deletions

View file

@ -108,10 +108,6 @@ sub build_GET {
# If this is an aggregate build, get its constituents.
$c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})];
$c->stash->{isChannel} = $c->stash->{build}->buildproducts->search(
{type => "channel"}
)->count > 0;
}

View file

@ -188,7 +188,7 @@
<td>[% IF cachedBuild; INCLUDE renderFullBuildLink build=cachedBuild; ELSE %]<em>unknown</em>[% END %]</td>
</tr>
[% END %]
[% IF (!isAggregate || !isChannel) && build.finished; actualBuild = build.iscachedbuild ? cachedBuild : build %]
[% IF (!isAggregate || !build.isChannel) && build.finished; actualBuild = build.iscachedbuild ? cachedBuild : build %]
[% IF actualBuild %]
<tr>
<th>Duration:</th>
@ -200,7 +200,7 @@
<td>[% INCLUDE renderDateTime timestamp = build.stoptime; %]</td>
</tr>
[% END %]
[% IF (!isAggregate || !isChannel) && buildLogExists(build) %]
[% IF (!isAggregate || !build.isChannel) && buildLogExists(build) %]
<tr>
<th>Logfile:</th>
<td>
@ -215,7 +215,7 @@
</tr>
</table>
[% IF isChannel || (build.buildproducts && !isAggregate) %]
[% IF build.isChannel || (build.buildproducts && !isAggregate) %]
<h3>Build products</h3>