From ce64132de109f5b78aa527d6704994fc7367c651 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 8 May 2015 17:12:24 +0200 Subject: [PATCH] Pass repo to job components from the build template It seems that when repo object on job is not instantiated it can error out when trying to use slug along with slug. Before I dig deeper into this, the easy fix is to pass repo from the top, because on repo view it's loaded already. --- app/templates/build.hbs | 4 ++-- app/templates/components/jobs-item.hbs | 2 +- app/templates/components/jobs-list.hbs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/templates/build.hbs b/app/templates/build.hbs index 69d77943..37b150aa 100644 --- a/app/templates/build.hbs +++ b/app/templates/build.hbs @@ -78,8 +78,8 @@ {{#if build.isMatrix}} {{#if jobsLoaded}} - {{jobs-list jobs=build.requiredJobs required="true"}} - {{jobs-list jobs=build.allowedFailureJobs}} + {{jobs-list jobs=build.requiredJobs repo=repo required="true"}} + {{jobs-list jobs=build.allowedFailureJobs repo=repo}} {{else}}
diff --git a/app/templates/components/jobs-item.hbs b/app/templates/components/jobs-item.hbs index cb4aaf2d..a0fa0d83 100644 --- a/app/templates/components/jobs-item.hbs +++ b/app/templates/components/jobs-item.hbs @@ -1,4 +1,4 @@ -{{#link-to "job" job.repo job}} +{{#link-to "job" repo job}}
diff --git a/app/templates/components/jobs-list.hbs b/app/templates/components/jobs-list.hbs index e6d0aa6d..13055aa8 100644 --- a/app/templates/components/jobs-list.hbs +++ b/app/templates/components/jobs-list.hbs @@ -14,7 +14,7 @@