From b754e68f9d1f5d7e134eda7971cdef7910b2b274 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Wed, 20 Nov 2024 08:33:03 +0100 Subject: [PATCH] fix(history): drop TempTripleHistoryLogs api view Remove the TempTripleHistoryLogs API view, because it has a hardcoded dependency on the TempTriple model and therefore *needs* the `apis_core.apis_relations` app in the INSTALLED_APPS. Together with the API view we are also dropping the url pointing to the API view. --- apis_core/history/api_views.py | 10 ---------- apis_core/history/urls.py | 6 ------ 2 files changed, 16 deletions(-) diff --git a/apis_core/history/api_views.py b/apis_core/history/api_views.py index e4f24c7e9..44c545a45 100644 --- a/apis_core/history/api_views.py +++ b/apis_core/history/api_views.py @@ -1,7 +1,5 @@ -from django.db.models import Q from rest_framework.generics import ListAPIView, RetrieveAPIView -from apis_core.apis_relations.models import TempTriple from apis_core.history.serializers import ( HistoryLogSerializer, HistoryObjectSerializer, @@ -19,14 +17,6 @@ def get_queryset(self): ) -class TempTripleHistoryLogs(ListAPIView): - serializer_class = HistoryLogSerializer - - def get_queryset(self): - id = self.kwargs.get("pk") - return TempTriple.history.filter(Q(subj_id=id) | Q(obj_id=id)) - - class GenericHistoryLog(RetrieveAPIView): serializer_class = HistoryObjectSerializer diff --git a/apis_core/history/urls.py b/apis_core/history/urls.py index 1e5f902fa..7c0e5b1d8 100644 --- a/apis_core/history/urls.py +++ b/apis_core/history/urls.py @@ -4,7 +4,6 @@ from apis_core.history.api_views import ( EntityHistoryLogs, GenericHistoryLog, - TempTripleHistoryLogs, ) app_name = "history" @@ -26,11 +25,6 @@ EntityHistoryLogs.as_view(), name="entityhistorylog", ), - path( - "api/version_log/temp_triple//", - TempTripleHistoryLogs.as_view(), - name="temptriplehistorylog", - ), path( "api/entity_combined///", GenericHistoryLog.as_view(),