Skip to content

Commit

Permalink
refactor: if $this->validation is null, the model did not run validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Apr 8, 2024
1 parent 27a017d commit bb27508
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Models/CheckQueryReturnTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ protected function checkQueryReturn($return): void

protected function checkValidationError(): void
{
$this->validation ??= service('validation');
if ($this->validation === null) {
return;
}

$validationErrors = $this->validation->getErrors();

Expand Down

0 comments on commit bb27508

Please sign in to comment.