From c75f64766a1848bf0d7b9b7e5cece814e7e4555a Mon Sep 17 00:00:00 2001 From: Damillora Date: Sat, 9 Jan 2021 14:30:51 +0100 Subject: [PATCH] Only filter by id when query by title --- songs/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/songs/views.py b/songs/views.py index 5959a55..ca0c82c 100644 --- a/songs/views.py +++ b/songs/views.py @@ -21,5 +21,5 @@ def song_id(request, id): return redirect(song_show,id=song.id,title=song.title) def song_show(request, id, title): - song = Song.objects.filter(id=id,title=title)[0] - return render(request,'songs/show.html',{'song':song}) \ No newline at end of file + song = Song.objects.filter(id=id)[0] + return render(request,'songs/show.html',{'song':song})