Skip to content

Commit

Permalink
[FIXED JENKINS-25472] Job never built 404
Browse files Browse the repository at this point in the history
Now we direct to the job page instead of the lastBuild if there's none.
  • Loading branch information
batmat committed Nov 6, 2014
1 parent e7beaed commit eb74f51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/hudson/model/JobViewEntry.java
Expand Up @@ -149,7 +149,11 @@ public String getUrl() {
}

public String getLastBuildUrl() {
return this.job.getLastBuild().getUrl();
Run lastBuild = job.getLastBuild();
if (lastBuild == null) {
return job.getUrl();
}
return lastBuild.getUrl();
}

/**
Expand Down

0 comments on commit eb74f51

Please sign in to comment.