From b13d20905127a2b0b6bbdb4df6e4199489a4a6f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Thu, 9 Apr 2020 14:22:58 +0200 Subject: [PATCH] Use correct ID to find a preset footprint when creating new part. Fixes issue #40. --- src/Controller/PartController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/PartController.php b/src/Controller/PartController.php index d5495927..12edefcb 100644 --- a/src/Controller/PartController.php +++ b/src/Controller/PartController.php @@ -244,7 +244,7 @@ class PartController extends AbstractController } $fid = $request->get('footprint', null); - $footprint = $fid ? $em->find(Footprint::class, $cid) : null; + $footprint = $fid ? $em->find(Footprint::class, $fid) : null; if (null !== $footprint && null === $new_part->getFootprint()) { $new_part->setFootprint($footprint); }