From 03fed5cb02cf1c2f0a32fb50fffad93d395b8497 Mon Sep 17 00:00:00 2001 From: Roardom Date: Sun, 3 Nov 2024 11:39:12 +0000 Subject: [PATCH] fix: delete playlist comments on playlist deletion --- app/Http/Controllers/PlaylistController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/PlaylistController.php b/app/Http/Controllers/PlaylistController.php index 9b7961f7b6..2b5567158b 100644 --- a/app/Http/Controllers/PlaylistController.php +++ b/app/Http/Controllers/PlaylistController.php @@ -172,6 +172,7 @@ public function destroy(Request $request, Playlist $playlist): \Illuminate\Http\ abort_unless($request->user()->id == $playlist->user_id || $request->user()->group->is_modo, 403); $playlist->torrents()->detach(); + $playlist->comments()->delete(); $playlist->delete(); return to_route('playlists.index')