Do not do double retrieval of parts, as this makes options passing difficult

This commit is contained in:
Jan Böhmer 2026-05-14 12:41:32 +02:00
parent e10bf89d6d
commit 6a3be77ec0

View file

@ -328,10 +328,12 @@ final class PartController extends AbstractController
//Force info providers to not use cache, when retrieving part details for creating a new part, because otherwise we might end up with outdated information
$no_cache = $request->query->getBoolean('no_cache', false);
$skip_delegation = $request->query->getBoolean('skip_delegation', false);
$submitted_page_token = $request->query->getString('submitted_page_token');
$dto = $infoRetriever->getDetails($providerKey, $providerId, [
InfoProviderInterface::OPTION_NO_CACHE => $no_cache,
InfoProviderInterface::OPTION_SKIP_DELEGATION => $skip_delegation,
InfoProviderInterface::OPTION_SUBMITTED_PAGE_TOKEN => $submitted_page_token,
]);
$new_part = $infoRetriever->dtoToPart($dto);