user-panel #9

Merged
cayop merged 25 commits from user-panel into main 2024-10-11 14:26:36 +00:00
Showing only changes of commit f5f0ea3c35 - Show all commits

View file

@ -99,7 +99,7 @@ class TokenDeleteView(DashboardView, DeleteView):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
self.pk = kwargs['pk'] self.pk = kwargs['pk']
self.object = get_object_or_404(self.model, pk=self.pk) self.object = get_object_or_404(self.model, pk=self.pk, owner=self.request.user)
self.object.delete() self.object.delete()
return redirect('api:tokens') return redirect('api:tokens')