Allow to automatically create new manufacturers within quick apply

This commit is contained in:
Jan Böhmer 2026-05-04 21:48:25 +02:00
parent 2ab355fd1f
commit 7c056c5dff

View file

@ -576,6 +576,13 @@ class BulkInfoProviderImportController extends AbstractController
$providerPart = $infoRetriever->dtoToPart($dto);
$partMerger->merge($part, $providerPart);
//Persist part manufacturer and supplier if they are new, to avoid issues with detached entities during merge
//Do not footprints here, as it might pollute the database with unwanted formatting footprints from the provider,
$this->entityManager->persist($part->getManufacturer());
foreach ($part->getOrderdetails() as $orderdetail) {
$this->entityManager->persist($orderdetail->getSupplier());
}
try {
$this->entityManager->flush();
} catch (ORMInvalidArgumentException $exception) {