Don't try to fetch lastBuild if there's no id

This commit is contained in:
Piotr Sarnacki 2015-02-11 12:59:07 +01:00
parent 4afd7db020
commit 0309ac29c0

View File

@ -28,9 +28,9 @@ Repo = Model.extend
).property('lastBuildId', 'lastBuildNumber')
lastBuild: (->
id = @get('lastBuildId')
@store.find('build', id)
@store.recordForId('build', id)
if id = @get('lastBuildId')
@store.find('build', id)
@store.recordForId('build', id)
).property('lastBuildId')
withLastBuild: ->