You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by jo...@apache.org on 2023/03/26 19:44:05 UTC

[causeway] 02/03: ISIS-3171 cleanup CollectionAggregator

This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch ISIS-3171
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 9c6695af218c660e9f2259b9949ed32c3fd4ce3e
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Wed Mar 1 08:46:34 2023 +0100

    ISIS-3171 cleanup CollectionAggregator
---
 .../client/kroviz/core/aggregator/CollectionAggregator.kt        | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/CollectionAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/CollectionAggregator.kt
index 7a8a89cfb6..d9476a52ca 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/CollectionAggregator.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/CollectionAggregator.kt
@@ -167,11 +167,10 @@ class CollectionAggregator(actionTitle: String, private val parent: ObjectAggreg
     }
 
     private fun handleCollection(collection: Collection) {
-        if (isParentedCollection()) {
-            getDisplayModel().id = collection.id
-            // add displayModel to parent.displayModel
-            val objectDM = parent!!.getDisplayModel()
-            objectDM.addCollectionModel(getDisplayModel())
+        if (parent != null) {
+            val cdm = getDisplayModel()
+            cdm.id = collection.id
+            parent.getDisplayModel().addCollectionModel(cdm)
         }
         collection.links.forEach {
             if (it.relation() == Relation.DESCRIBED_BY) {