Skip to content

Commit

Permalink
attempt to improve error displaying while account loading
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Mar 7, 2019
1 parent 91ec067 commit 0ba7384
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -24,6 +24,7 @@

import com.evolveum.midpoint.gui.api.page.PageBase;
import com.evolveum.midpoint.model.api.AssignmentCandidatesSpecification;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
import com.evolveum.midpoint.prism.path.ItemPath;
import org.apache.commons.lang.StringUtils;
Expand Down Expand Up @@ -211,6 +212,11 @@ private static <T extends ObjectType> String getIconColumnTitle(IModel<Selectabl
if (rowModel == null || rowModel.getObject() == null){
return null;
}
if (rowModel.getObject().getResult() != null && rowModel.getObject().getResult().isFatalError()){
OperationResult result = rowModel.getObject().getResult();
return result.getUserFriendlyMessage() != null ?
result.getUserFriendlyMessage().getFallbackMessage() : result.getMessage();
}
Class<T> type = (Class<T>)rowModel.getObject().getValue().getClass();
T object = rowModel.getObject().getValue();
if (object == null && !ShadowType.class.equals(type)){
Expand Down

0 comments on commit 0ba7384

Please sign in to comment.