Skip to content
Snippets Groups Projects
Commit 346a3919 authored by srosse's avatar srosse
Browse files

OO-2660: check if the portfolio to delete is a version one portfolio and if it exists

parent 4123e80b
No related branches found
No related tags found
No related merge requests found
......@@ -187,8 +187,13 @@ public class EPFrontendManager implements UserDataDeletable, DeletableGroupData
final Property mapKeyProperty = npm.findProperty(null, null, CollaborationTools.PROP_CAT_BG_COLLABTOOLS, CollaborationTools.KEY_PORTFOLIO);
if (mapKeyProperty != null) {
final Long mapKey = mapKeyProperty.getLongValue();
final PortfolioStructure map = loadPortfolioStructureByKey(mapKey);
deletePortfolioStructure(map);
final String version = mapKeyProperty.getStringValue();
if(!"2".equals(version)) {
final PortfolioStructure map = loadPortfolioStructureByKey(mapKey);
if(map != null) {
deletePortfolioStructure(map);
}
}
return true;
}
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment