Commit 99b59b98 authored by Anthony Geourjon's avatar Anthony Geourjon
Browse files

Add gently message for user and log

parent 1e9a77ff
......@@ -124,7 +124,8 @@ class ReportController extends Controller
// Abort if $report is null.
if(!$report){
Log::error("Issue #467 Report null on getIndicators, data: ".json_encode($data));
abort(403);
abort(404, "Report not found");
}
$user = Auth::user();
abort_if($user->cannot('view', $report->mission), 403);
......
......@@ -784,6 +784,12 @@ var reportsTable = (function() {
data: {
report: rowData.id_report
},
error : function (jqXhr, textStatus) {
if (jqXhr.status === 404) {
alertGently(__("Rapport introuvable, veuillez recharger la page avec F5"));
return;
}
},
cache: false
}).done(function (data) {
//$("td.expanded").append('<div class="dashboard loader"><div class="titre"></div></div>');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment