No need to save page

This commit is contained in:
jakob 2019-10-28 16:53:48 +01:00
parent 4daeb9daa6
commit 7368ff3e6a

View File

@ -307,15 +307,13 @@ class PageRepo
}
if ($parent instanceof Chapter) {
$parentChapter = $parent;
$parent = $parent->book;
$page->chapter_id = $parentChapter->id;
$page->save();
$page->chapter_id = $parent->id;
}
$page->changeBook($parent instanceof Book ? $parent->id : $parent->book->id);
$page->rebuildPermissions();
return $parent;
return ($parent instanceof Book ? $parent : $parent->book);
}
/**