Skip to content
Permalink
Browse files

[FIXED JENKINS-25472] Job never built 404

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 eb74f5193601bddeee3503c2c39aab53edd34ff4
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/hudson/model/JobViewEntry.java
@@ -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();
}

/**

0 comments on commit eb74f51

Please sign in to comment.
You can’t perform that action at this time.