asset_id is not allowed to be null in asset_log according to db schema. 0 it out here to make sqlite happy.

This commit is contained in:
Daniel Meltzer 2016-05-25 20:32:45 -05:00
parent 0fa82743a1
commit 4af5cdd64f
2 changed files with 2 additions and 0 deletions

View file

@ -313,6 +313,7 @@ class AccessoriesController extends Controller
$logaction = new Actionlog();
$logaction->accessory_id = $accessory->id;
$logaction->asset_id = 0;
$logaction->checkedout_to = $accessory->assigned_to;
$logaction->asset_type = 'accessory';
$logaction->location_id = $user->location_id;

View file

@ -319,6 +319,7 @@ class ConsumablesController extends Controller
$logaction->consumable_id = $consumable->id;
$logaction->checkedout_to = $consumable->assigned_to;
$logaction->asset_type = 'consumable';
$logaction->asset_id = 0;
$logaction->location_id = $user->location_id;
$logaction->user_id = Auth::user()->id;
$logaction->note = e(Input::get('note'));