diff --git a/src/CommandHandler/Wishlist/CreateNewWishlistHandler.php b/src/CommandHandler/Wishlist/CreateNewWishlistHandler.php index 43050f65..314eba18 100644 --- a/src/CommandHandler/Wishlist/CreateNewWishlistHandler.php +++ b/src/CommandHandler/Wishlist/CreateNewWishlistHandler.php @@ -73,9 +73,9 @@ public function __invoke(CreateNewWishlist $createNewWishlist): void } if ($user instanceof ShopUserInterface) { - $wishlists = $this->wishlistRepository->findAllByShopUser($user->getId()); + $wishlists = $this->wishlistRepository->findAllByShopUser($wishlist->getShopUser()->getId()); } else { - $wishlists = $this->wishlistRepository->findAllByAnonymous($wishlistCookieToken); + $wishlists = $this->wishlistRepository->findAllByToken($wishlistCookieToken); } /** @var WishlistInterface $wishlist */