From ef8c1abf28ddb579fc801cd71473b608ce25d677 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 27 Sep 2017 14:50:17 -0700 Subject: [PATCH] Fixes #3113 and #4040 --- app/Models/SnipeModel.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/Models/SnipeModel.php b/app/Models/SnipeModel.php index 43cf0cfc92..2b2b49623b 100644 --- a/app/Models/SnipeModel.php +++ b/app/Models/SnipeModel.php @@ -77,6 +77,24 @@ class SnipeModel extends Model return; } + public function setMinAmtAttribute($value) + { + if ($value == '') { + $value = null; + } + $this->attributes['min_amt'] = $value; + return; + } + + public function setParentIdAttribute($value) + { + if ($value == '') { + $value = null; + } + $this->attributes['parent_id'] = $value; + return; + } + // public function getDisplayNameAttribute() {