Fix job route's use of job.build relationship
build is an async relationship now, so job.get('build') returns a promise.
This commit is contained in:
parent
e4623d981b
commit
34e53c1034
|
@ -18,16 +18,18 @@ Route = TravisRoute.extend
|
||||||
@controllerFor('job').set('job', model)
|
@controllerFor('job').set('job', model)
|
||||||
repo.activate('job')
|
repo.activate('job')
|
||||||
|
|
||||||
if build = model.get('build')
|
buildController = @controllerFor('build')
|
||||||
build = @store.recordForId('build', build.get('id'))
|
|
||||||
buildController = @controllerFor('build')
|
|
||||||
|
|
||||||
# this is a hack to not set favicon changes from build
|
model.get('repo')
|
||||||
# controller while we're viewing job, this should go away
|
if buildPromise = model.get('build')
|
||||||
# after refactoring of controllers
|
buildPromise.then (build) =>
|
||||||
buildController.set('sendFaviconStateChanges', false)
|
build = @store.recordForId('build', build.get('id'))
|
||||||
|
buildController.set('build', build)
|
||||||
|
|
||||||
buildController.set('build', build)
|
# this is a hack to not set favicon changes from build
|
||||||
|
# controller while we're viewing job, this should go away
|
||||||
|
# after refactoring of controllers
|
||||||
|
buildController.set('sendFaviconStateChanges', false)
|
||||||
|
|
||||||
model: (params) ->
|
model: (params) ->
|
||||||
@store.find('job', params.job_id)
|
@store.find('job', params.job_id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user