Resolve manyToMany cases

This commit is contained in:
2025-02-19 12:35:25 +01:00
parent 480dcf2b2b
commit 5b1b0f7fb1
4 changed files with 57 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Routing\Annotation\Route;
class ThirdpartyDuplicateController extends AbstractController
{
public function __construct(private ThirdPartyRepository $thirdPartyRepository, private ThirdpartyMergeService $thirdPartyMergeService) {}
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdpartyMergeService $thirdPartyMergeService) {}
#[Route(path: '/{_locale}/3party/{thirdparty_id}/find-manually', name: 'chill_thirdparty_find_duplicate')]
public function findManuallyDuplicateAction(mixed $thirdparty_id, Request $request)
@@ -41,10 +41,6 @@ class ThirdpartyDuplicateController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$thirdparty2 = $form->get('thirdparty')->getData();
if (null === $thirdparty2) {
throw $this->createNotFoundException("Thirdparty with id {$thirdparty2->getId}() not".' found on this server');
}
$direction = $form->get('direction')->getData();
if ('starting' === $direction) {