Skip to content

Commit

Permalink
fix MID-5232 Internal error 500 by searching in CSV resource
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Apr 10, 2019
1 parent 5ea3f89 commit f478155
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Expand Up @@ -102,12 +102,7 @@ private <T extends ObjectType> List<SearchItemDefinition> createAttributeDefinit
}

private ItemName getAttributeName(ResourceAttributeDefinition def) {
if (def.getNativeAttributeName() != null) {
return ItemName.fromQName(new QName(MidPointConstants.NS_RI, def.getNativeAttributeName()));
}

return def.getName();

}

@Override
Expand Down
Expand Up @@ -45,6 +45,7 @@
import com.evolveum.midpoint.xml.ns._public.common.common_3.PropertyAccessType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.PropertyLimitationsType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceAttributeDefinitionType;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.NotNull;

/**
Expand Down Expand Up @@ -203,6 +204,9 @@ public void setHelp(String help) {

@Override
public String getDisplayName() {
if (displayName == null && attributeDefinition != null && StringUtils.isNotEmpty(attributeDefinition.getNativeAttributeName())){
return attributeDefinition.getNativeAttributeName();
}
return displayName;
}

Expand Down

0 comments on commit f478155

Please sign in to comment.