Skip to content

Commit

Permalink
Only set journey books when there are some
Browse files Browse the repository at this point in the history
  • Loading branch information
lkm committed Feb 14, 2020
1 parent 8f95365 commit 72adeb8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Entity/Journey.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down

0 comments on commit 72adeb8

Please sign in to comment.