Skip to content

A free open source IT asset/license management system

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

Daniel Meltzer4af5cdd64f5a
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'));