From 4be8ae7f3d8648c3a125b4ac5615cb701253212a Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 25 Jan 2018 03:34:52 -0800 Subject: [PATCH] Fuckery. --- app/Models/Asset.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 56fd9fc60..e220f4940 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -231,7 +231,9 @@ class Asset extends Depreciable */ public function get_depreciation() { - return $this->model->depreciation; + if ($this->model) { + return $this->model->depreciation; + } } /**