diff --git a/public/typo3conf/ext/ep_products/Classes/Service/GroupsSwissService.php b/public/typo3conf/ext/ep_products/Classes/Service/GroupsSwissService.php index 9954bc0e..9938db69 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/GroupsSwissService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/GroupsSwissService.php @@ -72,16 +72,13 @@ class GroupsSwissService implements SingletonInterface, LoggerAwareInterface { $range = Period::after(new \DateTime('now'), '1 year'); - $result = $this->hotelRepository->findByIdentifier($hotelUid); + $hotel = $this->hotelRepository->findByIdentifier($hotelUid); - if (null === $result) { + if (null === $hotel) { $this->logger->error(sprintf('Hotel with uid %d not found', $hotelUid)); return false; } - /** @var Hotel $hotel */ - $hotel = $result->getFirst(); - try { $events = $this->contingentRepository->getEvents( \DateTime::createFromImmutable($range->getStartDate()),