Fixed chapter fetching during joint permission building

Somehow I accidentally deleted previous line 143 in this commit:
3839bf6bf1
which would then break permission generation for content related to, or
containing, chapters in the recycle bin.
Found via user report (subz) & debugging in discord.
This commit is contained in:
Dan Brown 2022-10-21 21:49:29 +01:00
parent 103649887f
commit ea6eacb400
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -140,6 +140,7 @@ class JointPermissionBuilder
return Book::query()->withTrashed()
->select(['id', 'owned_by'])->with([
'chapters' => function ($query) {
$query->withTrashed()->select(['id', 'owned_by', 'book_id']);
},
'pages' => function ($query) {
$query->withTrashed()->select(['id', 'owned_by', 'book_id', 'chapter_id']);