Fix ssh-key route
This commit is contained in:
parent
a6b9c2b0d9
commit
705fe69208
|
@ -6,7 +6,7 @@ Route = TravisRoute.extend
|
||||||
model: (params) ->
|
model: (params) ->
|
||||||
repo = @modelFor('repo')
|
repo = @modelFor('repo')
|
||||||
self = this
|
self = this
|
||||||
SshKey.fetch(repo.get('id')).then ( (result) -> result unless result.get('isNew') ), (xhr) ->
|
@store.find('sshKey', repo.get('id')).then ( (result) -> result unless result.get('isNew') ), (xhr) ->
|
||||||
if xhr.status == 404
|
if xhr.status == 404
|
||||||
# if there is no model, just return null. I'm not sure if this is the
|
# if there is no model, just return null. I'm not sure if this is the
|
||||||
# best answer, maybe we should just redirect to different route, like
|
# best answer, maybe we should just redirect to different route, like
|
||||||
|
|
Loading…
Reference in New Issue
Block a user