Don't try to propagate when there is nothin to propagate

This commit is contained in:
2026-08-24 14:09:58 -03:00
parent 29d05b84e6
commit f2084c161d
+1 -1
View File
@@ -670,7 +670,7 @@ abstract class Entity
if (in_array($relation, $possibleRelations)) { if (in_array($relation, $possibleRelations)) {
$this->$relation = $this->$relation()->get(); $this->$relation = $this->$relation()->get();
} }
if ($this->$relation) { if ($this->$relation && $propagate) {
$this->$relation->with($propagate); $this->$relation->with($propagate);
} }
} }