From 661016ee6ecec484f2dc1c7716680ab9b3034317 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Wed, 27 Sep 2023 16:31:00 +0200 Subject: [PATCH] fix: workaround for entities not inheriting from TempEntityClass --- apis_core/apis_entities/detail_generic.py | 2 +- apis_core/apis_entities/edit_generic.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apis_core/apis_entities/detail_generic.py b/apis_core/apis_entities/detail_generic.py index 7b178917d..eec5dbf5a 100644 --- a/apis_core/apis_entities/detail_generic.py +++ b/apis_core/apis_entities/detail_generic.py @@ -72,7 +72,7 @@ def get(self, request, *args, **kwargs): # TODO RDF : Check / Adapt the following code to rdf architecture object_lod = Uri.objects.filter(root_object=self.instance) - object_labels = Label.objects.filter(temp_entity=self.instance) + object_labels = Label.objects.filter(temp_entity__id=self.instance.id) tb_label = LabelTableBase(data=object_labels, prefix=entity.title()[:2] + "L-") tb_label_open = request.GET.get("PL-page", None) side_bar.append(("Label", tb_label, "PersonLabel", tb_label_open)) diff --git a/apis_core/apis_entities/edit_generic.py b/apis_core/apis_entities/edit_generic.py index 77c5477b1..89582af71 100644 --- a/apis_core/apis_entities/edit_generic.py +++ b/apis_core/apis_entities/edit_generic.py @@ -112,7 +112,7 @@ def get(self, request, *args, **kwargs): apis_bibsonomy = False object_revisions = Version.objects.get_for_object(self.instance) object_lod = Uri.objects.filter(root_object=self.instance) - object_labels = Label.objects.filter(temp_entity=self.instance) + object_labels = Label.objects.filter(temp_entity__id=self.instance.id) tb_label = LabelTableEdit( data=object_labels, prefix=self.entity.title()[:2] + "L-" )