From 4af5cdd64f5a3cd21a5e8574f1645bcc6ff8a25b Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Wed, 25 May 2016 20:32:45 -0500 Subject: [PATCH] asset_id is not allowed to be null in asset_log according to db schema. 0 it out here to make sqlite happy. --- app/Http/Controllers/AccessoriesController.php | 1 + app/Http/Controllers/ConsumablesController.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Http/Controllers/AccessoriesController.php b/app/Http/Controllers/AccessoriesController.php index 5c29dc7642..736a0db964 100755 --- a/app/Http/Controllers/AccessoriesController.php +++ b/app/Http/Controllers/AccessoriesController.php @@ -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; diff --git a/app/Http/Controllers/ConsumablesController.php b/app/Http/Controllers/ConsumablesController.php index a3a3899192..7a6f01c72d 100644 --- a/app/Http/Controllers/ConsumablesController.php +++ b/app/Http/Controllers/ConsumablesController.php @@ -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'));