fix: deleting polymorphic comments

This commit is contained in:
HDVinnie
2022-11-15 17:45:47 -05:00
parent ace8dcb5b1
commit ef402c5529
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -333,7 +333,7 @@ class TorrentController extends Controller
//Remove Torrent related info
\cache()->forget(\sprintf('torrent:%s', $torrent->info_hash));
Comment::where('torrent_id', '=', $id)->delete();
$torrent->comments()->delete();
Peer::where('torrent_id', '=', $id)->delete();
History::where('torrent_id', '=', $id)->delete();
Warning::where('torrent', '=', $id)->delete();