mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Make sure there is a valid status label associated withthe asset when checking if deployable
This commit is contained in:
parent
7efa7ec03f
commit
c9e6a75ea8
|
@ -128,7 +128,11 @@ class Asset extends Depreciable
|
|||
|
||||
public function availableForCheckout()
|
||||
{
|
||||
if ((empty($this->assigned_to)) && (empty($this->deleted_at)) && ($this->assetstatus->deployable == 1)) {
|
||||
if (
|
||||
(empty($this->assigned_to)) &&
|
||||
(empty($this->deleted_at)) &&
|
||||
(($this->assetstatus) && ($this->assetstatus->deployable == 1)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue