mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-15 16:01:33 +00:00
Do not do double retrieval of parts, as this makes options passing difficult
This commit is contained in:
parent
e10bf89d6d
commit
6a3be77ec0
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue