From f596712d550644375f84cab09db3a5c18f29c3b8 Mon Sep 17 00:00:00 2001 From: Sarai Misidjan Date: Thu, 16 Nov 2023 09:22:46 +0100 Subject: [PATCH] remove sync --- src/Service/GithubApiService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Service/GithubApiService.php b/src/Service/GithubApiService.php index af8b8b0c..3bf886a0 100644 --- a/src/Service/GithubApiService.php +++ b/src/Service/GithubApiService.php @@ -351,6 +351,8 @@ public function getConnectedComponents(ObjectEntity $organization, array $openca // Get the github repository from the given url if the object is null. if ($repositorySync->getObject() === null) { + $this->entityManager->remove($repositorySync); + $this->entityManager->flush(); $repository = $this->getGithubRepository($repositoryUrl); } @@ -409,6 +411,8 @@ public function getConnectedComponents(ObjectEntity $organization, array $openca // Get the github repository from the given url if the object is null. if ($repositorySync->getObject() === null) { + $this->entityManager->remove($repositorySync); + $this->entityManager->flush(); $repository = $this->getGithubRepository($repositoryUrl); }