Merge pull request #11700 from inietov/fixes/unaccepted_assets_reminder_500

Fixed 500 error when sending unaccepted assets reminder
This commit is contained in:
snipe 2022-08-25 14:00:00 -07:00 committed by GitHub
commit 482a7b2a3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1006,7 +1006,11 @@ class ReportsController extends Controller
}
$assetItem = $acceptance->checkoutable;
if (is_null($acceptance->created_at)){
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.bad_data'));
} else {
$logItem = $assetItem->checkouts()->where('created_at', '=', $acceptance->created_at)->get()[0];
}
if(!$assetItem->assignedTo->locale){
Notification::locale(Setting::getSettings()->locale)->send(