Skip to content

Commit

Permalink
fix for old names from v11 or earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
PKuhlmay committed Jun 28, 2024
1 parent 100e421 commit e973ef6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Build/Sources/helper/converter/convertModulesToNodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function convertModulesToNodes(modules) {
y: item.config.position[1]
},
data: {
label: item.name,
label: getModelName(item),
objectType: "foobar",
isAggregateRoot: item.value.objectsettings.aggregateRoot,
enableSorting: item.value.objectsettings.sorting,
Expand Down Expand Up @@ -99,6 +99,18 @@ function convertModulesToNodes(modules) {
return result;
}

/**
* Workaround for older versions. In version 11 the name was stored inside value.name, not it is stored in name.
*/
function getModelName(item) {
console.log("item");
console.log(item);
if(item.name == 'New Model Object') {
return item.value.name;
}
return item.name;
}

export default convertModulesToNodes;

/*
Expand Down

0 comments on commit e973ef6

Please sign in to comment.