From 72adeb888b1e5d21e8e5d4ac35e52c17afbfde0f Mon Sep 17 00:00:00 2001 From: Lasse Mammen Date: Fri, 14 Feb 2020 09:00:05 +0000 Subject: [PATCH] Only set journey books when there are some --- src/Entity/Journey.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Entity/Journey.php b/src/Entity/Journey.php index f1801da..924dce6 100644 --- a/src/Entity/Journey.php +++ b/src/Entity/Journey.php @@ -24,10 +24,9 @@ public static function get(Bookboon $bookboon, string $journeyId) : BookboonResp if (count($journeyEntity->getBookIds()) > 0) { $books = Book::getMultiple($bookboon, $journeyEntity->getBookIds(), false); + $journeyEntity->setBooks($books->getEntityStore()->get()); } - $journeyEntity->setBooks($books->getEntityStore()->get()); - $bResponse->setEntityStore( new EntityStore( [