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, ];