From b4d81c3f5134de9281ede6bc389884c5c416264f Mon Sep 17 00:00:00 2001 From: Kumi Date: Mon, 26 Sep 2022 15:09:04 +0000 Subject: [PATCH] Fix URL lookup --- api/views/urls.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/views/urls.py b/api/views/urls.py index e65ef82..ca7bcae 100644 --- a/api/views/urls.py +++ b/api/views/urls.py @@ -11,11 +11,11 @@ class VesselsDataTableURLView(LoginRequiredMixin, View): class VesselsEditURLView(LoginRequiredMixin, View): def get(self, request, *args, **kwargs): - return JsonResponse(reverse_lazy("core:admin_vessels_edit", kwargs["id"]), safe=False) + return JsonResponse(reverse_lazy("core:admin_vessels_edit", kwargs=kwargs), safe=False) class VesselsDeleteURLView(LoginRequiredMixin, View): def get(self, request, *args, **kwargs): - return JsonResponse(reverse_lazy("core:admin_vessels_delete", kwargs["id"]), safe=False) + return JsonResponse(reverse_lazy("core:admin_vessels_delete", kwargs=kwargs), safe=False) class ReplicationSourcesDataTableURLView(LoginRequiredMixin, View): def get(self, request, *args, **kwargs): @@ -23,11 +23,11 @@ class ReplicationSourcesDataTableURLView(LoginRequiredMixin, View): class ReplicationSourcesEditURLView(LoginRequiredMixin, View): def get(self, request, *args, **kwargs): - return JsonResponse(reverse_lazy("core:admin_replication_sources_edit", kwargs["id"]), safe=False) + return JsonResponse(reverse_lazy("core:admin_replication_sources_edit", kwargs=kwargs), safe=False) class ReplicationSourcesDeleteURLView(LoginRequiredMixin, View): def get(self, request, *args, **kwargs): - return JsonResponse(reverse_lazy("core:admin_replication_sources_delete", kwargs["id"]), safe=False) + return JsonResponse(reverse_lazy("core:admin_replication_sources_delete", kwargs=kwargs), safe=False) class ReplicationTargetsDataTableURLView(LoginRequiredMixin, View): def get(self, request, *args, **kwargs): @@ -35,11 +35,11 @@ class ReplicationTargetsDataTableURLView(LoginRequiredMixin, View): class ReplicationTargetsEditURLView(LoginRequiredMixin, View): def get(self, request, *args, **kwargs): - return JsonResponse(reverse_lazy("core:admin_replication_targets_edit", kwargs["id"]), safe=False) + return JsonResponse(reverse_lazy("core:admin_replication_targets_edit", kwargs=kwargs), safe=False) class ReplicationTargetsDeleteURLView(LoginRequiredMixin, View): def get(self, request, *args, **kwargs): - return JsonResponse(reverse_lazy("core:admin_replication_targets_delete", kwargs["id"]), safe=False) + return JsonResponse(reverse_lazy("core:admin_replication_targets_delete", kwargs=kwargs), safe=False) class StaticsURLView(View): def get(self, request, *args, **kwargs):