mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fix tests
This commit is contained in:
parent
0182615e7e
commit
78530ae123
|
@ -13,11 +13,10 @@ trait UniqueSerialTrait
|
|||
*/
|
||||
protected function prepareUniqueSerialRule($parameters, $field)
|
||||
{
|
||||
$settings = \App\Models\Setting::first();
|
||||
|
||||
if ($settings->unique_serial=='1') {
|
||||
return 'unique_undeleted:'.$this->table.','. $this->getKey();
|
||||
if ($settings = \App\Models\Setting::first()) {
|
||||
if ($settings->unique_serial=='1') {
|
||||
return 'unique_undeleted:'.$this->table.','. $this->getKey();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue