mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 14:09:43 -08:00
Be more specific in accessory query
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
cdcb153b1e
commit
3e102bf57b
|
@ -51,8 +51,10 @@ class MoveAccessoryCheckoutNoteToJoinTable extends Migration
|
||||||
$action_log_entries = Actionlog::where('created_at', '=',$join_log->created_at)
|
$action_log_entries = Actionlog::where('created_at', '=',$join_log->created_at)
|
||||||
->where('target_id', '=',$join_log->assigned_to)
|
->where('target_id', '=',$join_log->assigned_to)
|
||||||
->where('item_id', '=',$accessory->id)
|
->where('item_id', '=',$accessory->id)
|
||||||
|
->where('item_type', '=','App\\Models\\Accessory')
|
||||||
->where('target_type', '=','App\\Models\\User')
|
->where('target_type', '=','App\\Models\\User')
|
||||||
->where('action_type', '=', 'checkout')
|
->where('action_type', '=', 'checkout')
|
||||||
|
->where('note', '!=', '')
|
||||||
->orderBy('created_at', 'DESC')->get();
|
->orderBy('created_at', 'DESC')->get();
|
||||||
|
|
||||||
\Log::debug($action_log_entries->count().' matching entries in the action_logs table');
|
\Log::debug($action_log_entries->count().' matching entries in the action_logs table');
|
||||||
|
|
Loading…
Reference in a new issue