Skip to content

Commit 35bbb77

Browse files
committed
refactor: if $this->validation is null, the model did not run validation
1 parent 31ffc40 commit 35bbb77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Models/CheckQueryReturnTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ protected function checkQueryReturn($return): void
4141

4242
protected function checkValidationError(): void
4343
{
44-
$this->validation ??= service('validation');
44+
if ($this->validation === null) {
45+
return;
46+
}
4547

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

0 commit comments

Comments
 (0)