X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/9e033709a78824decbf959ea25ce8672b026da09..refs/pull/2376/head:/app/Entities/Entity.php diff --git a/app/Entities/Entity.php b/app/Entities/Entity.php index ed3040929..99922bceb 100644 --- a/app/Entities/Entity.php +++ b/app/Entities/Entity.php @@ -295,10 +295,10 @@ class Entity extends Ownable public function getParent(): ?Entity { if ($this->isA('page')) { - return $this->chapter_id ? $this->chapter()->withTrashed()->first() : $this->book->withTrashed()->first(); + return $this->chapter_id ? $this->chapter()->withTrashed()->first() : $this->book()->withTrashed()->first(); } if ($this->isA('chapter')) { - return $this->book->withTrashed()->first(); + return $this->book()->withTrashed()->first(); } return null; }