mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge pull request #14171 from snipe/fixes/fd-39934
Removed attribute assigning blank EOL as 0
This commit is contained in:
commit
b39d11cc06
|
@ -46,15 +46,6 @@ class AssetModel extends SnipeModel
|
|||
protected $injectUniqueIdentifier = true;
|
||||
use ValidatingTrait;
|
||||
|
||||
public function setEolAttribute($value)
|
||||
{
|
||||
if ($value == '') {
|
||||
$value = 0;
|
||||
}
|
||||
|
||||
$this->attributes['eol'] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
|
|
|
@ -11,15 +11,6 @@ class AssetModelTest extends TestCase
|
|||
{
|
||||
use InteractsWithSettings;
|
||||
|
||||
public function testAnAssetModelZerosOutBlankEols()
|
||||
{
|
||||
$am = new AssetModel;
|
||||
$am->eol = '';
|
||||
$this->assertTrue($am->eol === 0);
|
||||
$am->eol = '4';
|
||||
$this->assertTrue($am->eol == 4);
|
||||
}
|
||||
|
||||
public function testAnAssetModelContainsAssets()
|
||||
{
|
||||
$category = Category::factory()->create([
|
||||
|
|
Loading…
Reference in a new issue