Skip to content

Commit b39d11c

Browse files
authored
Merge pull request #14171 from snipe/fixes/fd-39934
Removed attribute assigning blank EOL as 0
2 parents 85a158e + d6c61e1 commit b39d11c

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

app/Models/AssetModel.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,6 @@ class AssetModel extends SnipeModel
4646
protected $injectUniqueIdentifier = true;
4747
use ValidatingTrait;
4848

49-
public function setEolAttribute($value)
50-
{
51-
if ($value == '') {
52-
$value = 0;
53-
}
54-
55-
$this->attributes['eol'] = $value;
56-
}
57-
5849
/**
5950
* The attributes that are mass assignable.
6051
*

tests/Unit/AssetModelTest.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,7 @@
1010
class AssetModelTest extends TestCase
1111
{
1212
use InteractsWithSettings;
13-
14-
public function testAnAssetModelZerosOutBlankEols()
15-
{
16-
$am = new AssetModel;
17-
$am->eol = '';
18-
$this->assertTrue($am->eol === 0);
19-
$am->eol = '4';
20-
$this->assertTrue($am->eol == 4);
21-
}
22-
13+
2314
public function testAnAssetModelContainsAssets()
2415
{
2516
$category = Category::factory()->create([

0 commit comments

Comments
 (0)