Skip to content

Commit

Permalink
MID-7976 request access wizard, relation panel NPE fix
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Aug 6, 2022
1 parent 4585b69 commit 1645137
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ private Tile<QName> createTileForRelation(QName name) {
String icon = DEFAULT_RELATION_ICON;
String label = name.getLocalPart();

if (config == null) {
return createTile(icon, label, name);
}

for (RelationDefinitionType rel : config.getRelation()) {
if (!name.equals(rel.getRef())) {
continue;
Expand All @@ -191,8 +195,12 @@ private Tile<QName> createTileForRelation(QName name) {
break;
}

return createTile(icon, label, name);
}

private Tile<QName> createTile(String icon, String label, QName value) {
Tile tile = new Tile(icon, label);
tile.setValue(name);
tile.setValue(value);

return tile;
}
Expand Down

0 comments on commit 1645137

Please sign in to comment.