Include only current votes into change message when removing a reviewer

Change-Id: I541d7f7b130a40811f398910169e493acc212537
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2014-03-27 01:26:48 +01:00
parent 78d1d9e976
commit d61ebb1a01

View File

@@ -81,7 +81,8 @@ public class DeleteReviewer implements RestModifyView<ReviewerResource, Input> {
for (PatchSetApproval a : approvals(db, rsrc)) {
if (control.canRemoveReviewer(a)) {
del.add(a);
if (a.getValue() != 0) {
if (a.getPatchSetId().equals(control.getChange().currentPatchSetId())
&& a.getValue() != 0) {
if (msg.length() == 0) {
msg.append("Removed the following approvals:\n\n");
}