Skip to content

Commit

Permalink
fix(history): drop TempTripleHistoryLogs api view
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
b1rger committed Nov 20, 2024
1 parent b7ba802 commit b754e68
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
10 changes: 0 additions & 10 deletions apis_core/history/api_views.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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

Expand Down
6 changes: 0 additions & 6 deletions apis_core/history/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from apis_core.history.api_views import (
EntityHistoryLogs,
GenericHistoryLog,
TempTripleHistoryLogs,
)

app_name = "history"
Expand All @@ -26,11 +25,6 @@
EntityHistoryLogs.as_view(),
name="entityhistorylog",
),
path(
"api/version_log/temp_triple/<int:pk>/",
TempTripleHistoryLogs.as_view(),
name="temptriplehistorylog",
),
path(
"api/entity_combined/<contenttype:contenttype>/<int:pk>/",
GenericHistoryLog.as_view(),
Expand Down

0 comments on commit b754e68

Please sign in to comment.