Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2022-09-20 22:10:52 +02:00
parent f725be8892
commit 4d349816a5
3 changed files with 8 additions and 2 deletions

View File

@@ -6737,7 +6737,10 @@ class WorkoutDelete(PermissionRequiredMixin, DeleteView):
return reverse('workouts_view')
def get_object(self, *args, **kwargs):
workout_pk = self.kwargs['pk']
try:
workout_pk = self.kwargs['pk']
except KeyError:
workout_pk = self.kwargs['id']
try:
obj = Workout.objects.get(pk=workout_pk)
except (ValueError, Workout.DoesNotExist):