diff --git a/src/Service/TorrentService.php b/src/Service/TorrentService.php index 1424848..1e52555 100644 --- a/src/Service/TorrentService.php +++ b/src/Service/TorrentService.php @@ -1209,10 +1209,17 @@ class TorrentService $torrent->setTorrentPosterId( $torrentPoster->getId() ); + } - $this->entityManagerInterface->persist($torrent); - $this->entityManagerInterface->flush(); + else + { + $torrent->setTorrentPosterId( + null + ); } + + $this->entityManagerInterface->persist($torrent); + $this->entityManagerInterface->flush(); } }