diff --git a/be/app/Http/Resources/SubTaskResource.php b/be/app/Http/Resources/SubTaskResource.php index 3ba2bc1..c6ce5f5 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->isNotEmpty() ?: $this->mastertask->attachments), + 'files' => AttachmentResource::collection($this->attachments->isNotEmpty() ? $this->attachments : $this->mastertask->attachments), 'color' => $this->mastertask->color, ];