Respond with 404 if job doesn't have a repository

We have some jobs which doesn't have any repository in our DB. This is a
quick fix which returns 404 for such a request instead of raising an
error
Merge branch 'master' into mm-fix-gravatar-url