admin: fix bad location change after exercice deletion

This commit is contained in:
nemunaire 2018-12-10 00:29:02 +01:00
parent 03e3bb8118
commit d1e98fc4f9

View file

@ -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);
});