]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Entity.php
LDAP: Added TLS support
[bookstack] / app / Entities / Entity.php
index ed304092919c880a093854bc00e55f23edfb7067..99922bcebe50047c18563da197091d3b9bca1215 100644 (file)
@@ -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;
     }