Only filter by id when query by title

This commit is contained in:
Damillora 2021-01-09 14:30:51 +01:00
parent ed4c2065b6
commit c75f64766a
1 changed files with 2 additions and 2 deletions

View File

@ -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})
song = Song.objects.filter(id=id)[0]
return render(request,'songs/show.html',{'song':song})