Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jul 10, 2018
1 parent 0182615 commit 78530ae
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/Http/Traits/UniqueSerialTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

}
}

0 comments on commit 78530ae

Please sign in to comment.