No need to save page
This commit is contained in:
parent
4daeb9daa6
commit
7368ff3e6a
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue