Fetch board properly

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-10-23 15:31:34 +02:00
parent 1fcb667a3c
commit 9c8f5d5f63

View File

@@ -99,7 +99,7 @@ class ResourceProviderCard implements IProvider {
'id' => $resource->getId(), 'id' => $resource->getId(),
'name' => $board->getTitle() . ': ' . $card->getTitle(), 'name' => $board->getTitle() . ': ' . $card->getTitle(),
'link' => $link, 'link' => $link,
'iconUrl' => \OC::$server->getURLGenerator()->imagePath('core', 'actions/toggle-pictures.svg') 'iconUrl' => $this->urlGenerator->imagePath('core', 'actions/toggle-pictures.svg')
]; ];
} }
@@ -117,8 +117,7 @@ class ResourceProviderCard implements IProvider {
return false; return false;
} }
try { try {
$boardId = $this->cardMapper->findBoardId($resource->getId()); $board = $this->getBoard($resource->getId());
$board = $this->getBoard($boardId);
} catch (DoesNotExistException $e) { } catch (DoesNotExistException $e) {
return false; return false;
} catch (MultipleObjectsReturnedException $e) { } catch (MultipleObjectsReturnedException $e) {