From 373597ad3cbf9f309c66f323cb208f70de880b4e Mon Sep 17 00:00:00 2001
From: Thorge Petersen <petersen@rz.uni-kiel.de>
Date: Mon, 24 Oct 2022 10:17:22 +0000
Subject: [PATCH] Workaround for long processing collection relation item names
 to ids

---
 ckanext/odsh/profiles/odsh_dcat_de_profile.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ckanext/odsh/profiles/odsh_dcat_de_profile.py b/ckanext/odsh/profiles/odsh_dcat_de_profile.py
index 08dc6902..97dd57e5 100644
--- a/ckanext/odsh/profiles/odsh_dcat_de_profile.py
+++ b/ckanext/odsh/profiles/odsh_dcat_de_profile.py
@@ -175,11 +175,7 @@ class ODSHDCATdeProfile(DCATdeProfile):
 
     def _get_dataset_refs_belonging_to_collection(self, dataset_dict):
         dataset_names = helpers_collection.get_dataset_names(dataset_dict)
-        dataset_dicts = [model.Package.get(
-            name).as_dict() for name in dataset_names]
-        dataset_ids = [dataset_dict.get('id')
-                       for dataset_dict in dataset_dicts]
-        dataset_refs = [self._construct_refs(id) for id in dataset_ids]
+        dataset_refs = [self._construct_refs(name) for name in dataset_names]
         return dataset_refs
 
     @staticmethod
-- 
GitLab