Fix tests

This commit is contained in:
snipe 2018-07-09 21:57:45 -07:00
parent 0182615e7e
commit 78530ae123

View file

@ -13,11 +13,10 @@ trait UniqueSerialTrait
*/ */
protected function prepareUniqueSerialRule($parameters, $field) protected function prepareUniqueSerialRule($parameters, $field)
{ {
$settings = \App\Models\Setting::first(); if ($settings = \App\Models\Setting::first()) {
if ($settings->unique_serial=='1') { if ($settings->unique_serial=='1') {
return 'unique_undeleted:'.$this->table.','. $this->getKey(); return 'unique_undeleted:'.$this->table.','. $this->getKey();
} }
}
} }
} }