Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Don't allow resetting work if the revision doesn't have work yet.

  • Loading branch information...
commit 2b77636dac0ea42a693cdb470b8ab69b7934b842 1 parent 5c24901
Rolf Bjarne Kvinge authored December 15, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  MonkeyWrench.Web.UI/ViewLane.aspx.cs
6  MonkeyWrench.Web.UI/ViewLane.aspx.cs
@@ -155,8 +155,10 @@ public string GenerateLane (GetViewLaneDataResponse response)
155 155
 			} else {
156 156
 				if (response.RevisionWork.State == DBState.NotDone)
157 157
 					header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=ignorerevision'>don't build</a>", lane.id, dbr.id, host.id);
158  
-				header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=clearrevision'>reset work</a>", lane.id, dbr.id, host.id);
159  
-				header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=deleterevision'>delete work</a>", lane.id, dbr.id, host.id);
  158
+				if (response.RevisionWork.State != DBState.NoWorkYet) {
  159
+					header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=clearrevision'>reset work</a>", lane.id, dbr.id, host.id);
  160
+					header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=deleterevision'>delete work</a>", lane.id, dbr.id, host.id);
  161
+			}
160 162
 			}
161 163
 		}
162 164
 

0 notes on commit 2b77636

Please sign in to comment.
Something went wrong with that request. Please try again.