mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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()
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue