diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 2096939d..9ecac1a7 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -1094,9 +1094,10 @@ angular.module("FICApp") }; $scope.deleteExercice = function() { + var tid = $scope.exercice.id_theme; this.exercice.$remove(function() { $rootScope.staticFilesNeedUpdate++; - $location.url("/themes/" + $routeParams.themeId); + $location.url("/themes/" + tid); }, function(response) { $rootScope.newBox('danger', 'An error occurs when trying to delete exercice:', response.data.errmsg); });