diff --git a/lib/Db/Card.php b/lib/Db/Card.php index 9b50fdf06..21f65d79e 100644 --- a/lib/Db/Card.php +++ b/lib/Db/Card.php @@ -36,6 +36,7 @@ class Card extends RelationalEntity { protected $labels; protected $assignedUsers; protected $attachments; + protected $attachmentCount; protected $owner; protected $order; protected $archived = false; @@ -60,6 +61,7 @@ class Card extends RelationalEntity { $this->addRelation('labels'); $this->addRelation('assignedUsers'); $this->addRelation('attachments'); + $this->addRelation('attachmentCount'); $this->addRelation('participants'); $this->addResolvable('owner'); } diff --git a/lib/Service/StackService.php b/lib/Service/StackService.php index 12d988d24..30e40cc6e 100644 --- a/lib/Service/StackService.php +++ b/lib/Service/StackService.php @@ -74,7 +74,7 @@ class StackService { if (array_key_exists($card->id, $labels)) { $cards[$cardIndex]->setLabels($labels[$card->id]); } - $card->setAttachments($this->attachmentService->count($card->getId())); + $card->setAttachmentCount($this->attachmentService->count($card->getId())); } $stacks[$stackIndex]->setCards($cards); }