Skip to content

Commit

Permalink
core: Ignore isValid() == false, if migration succeeded
Browse files Browse the repository at this point in the history
In MaintenanceVdsCommand, if migrateAllVms() returned successful return
value, do not check isValid() and do not copy validation messages from
it.

Change-Id: I9c38423c88b7a4e8a84d6187835abe490278def5
Bug-Url: https://bugzilla.redhat.com/2108000
Signed-off-by: Shmuel Melamud <smelamud@redhat.com>
  • Loading branch information
smelamud authored and ahadas committed Jul 19, 2022
1 parent 9b33b56 commit 478fda9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected void executeCommand() {

ActionReturnValue returnValue = migrateAllVms(getExecutionContext());
setSucceeded(returnValue.getSucceeded());
if (!returnValue.isValid()) {
if (!returnValue.getSucceeded() && !returnValue.isValid()) {
getReturnValue().setValid(false);
getReturnValue().getValidationMessages().addAll(returnValue.getValidationMessages());
}
Expand Down

0 comments on commit 478fda9

Please sign in to comment.