mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Fix tests
This commit is contained in:
parent
0182615e7e
commit
78530ae123
|
@ -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();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue