Unify logic for validating draft deletions
This change makes validating draft deletions the same as draft publishings. Change-Id: I9ef00d6382c60ce28c1c002fc2c4733ac129e716
This commit is contained in:
@@ -255,7 +255,7 @@ public class ReviewCommand extends BaseCommand {
|
||||
ReviewResult result = publishDraftFactory.create(patchSetId).call();
|
||||
handleReviewResultErrors(result);
|
||||
} else if (deleteDraftPatchSet) {
|
||||
if (changeControl.isOwner() && changeControl.isVisible(db)) {
|
||||
if (changeControl.canDelete(db)) {
|
||||
try {
|
||||
ChangeUtil.deleteDraftPatchSet(patchSetId, gitManager, replication, patchSetInfoFactory, db);
|
||||
} catch (PatchSetInfoNotAvailableException e) {
|
||||
|
Reference in New Issue
Block a user