From 2e346b045b0deb9254fc47d3a364f231b2b9a475 Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Thu, 24 Aug 2023 15:53:37 +0200 Subject: [PATCH] no message --- be/app/Http/Resources/SubTaskResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/app/Http/Resources/SubTaskResource.php b/be/app/Http/Resources/SubTaskResource.php index aac6d2c..1e0439b 100644 --- a/be/app/Http/Resources/SubTaskResource.php +++ b/be/app/Http/Resources/SubTaskResource.php @@ -32,7 +32,7 @@ class SubTaskResource extends JsonResource 'is_finished' => $this->is_finished, 'timeblocks' => TimeblockResource::collection($this->timeblocks), 'timesheets' => TimesheetResource::collection($this->timesheets), - 'files' => AttachmentResource::collection($this->attachments), + 'files' => AttachmentResource::collection($this->attachments ?: $this->mastertask->attachments), 'color' => $this->mastertask->color, ];