Revision 5c45a99a
Added by Andreas Müller almost 2 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/PolytomousKeyNodeServiceImpl.java | ||
---|---|---|
16 | 16 |
import org.springframework.stereotype.Service; |
17 | 17 |
import org.springframework.transaction.annotation.Transactional; |
18 | 18 |
|
19 |
import eu.etaxonomy.cdm.hibernate.HHH_9751_Util; |
|
20 | 19 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
21 | 20 |
import eu.etaxonomy.cdm.model.description.PolytomousKey; |
22 | 21 |
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode; |
... | ... | |
53 | 52 |
} |
54 | 53 |
List<PolytomousKeyNode> children = new ArrayList<>(); |
55 | 54 |
|
56 |
node.removeNullValueFromChildren(); |
|
57 | 55 |
for (PolytomousKeyNode child: node.getChildren()){ |
58 | 56 |
children.add(child); |
59 | 57 |
} |
... | ... | |
81 | 79 |
result.addUpdatedObject(node); |
82 | 80 |
} |
83 | 81 |
if (parent!= null){ |
84 |
if (parent.getChildren().contains(null)){ |
|
85 |
List<PolytomousKeyNode> parentChildren = parent.getChildren(); |
|
86 |
HHH_9751_Util.removeAllNull(parentChildren); |
|
87 |
} |
|
88 | 82 |
parent.removeChild(node); |
89 | 83 |
dao.saveOrUpdate(parent); |
90 | 84 |
} |
Also available in: Unified diff
ref #10067, ref #3722, ref #8127 remove all manual sortindex and null value handling from polytomous key (node)