mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-10 05:39:35 +01:00
Check for None when requesting an artist page
This commit is contained in:
@@ -44,6 +44,8 @@ class WebInterface(object):
|
||||
myDB = db.DBConnection()
|
||||
artist = myDB.action('SELECT * FROM artists WHERE ArtistID=?', [ArtistID]).fetchone()
|
||||
albums = myDB.select('SELECT * from albums WHERE ArtistID=? order by ReleaseDate DESC', [ArtistID])
|
||||
if artist is None:
|
||||
raise cherrypy.HTTPRedirect("home")
|
||||
return serve_template(templatename="artist.html", title=artist['ArtistName'], artist=artist, albums=albums)
|
||||
artistPage.exposed = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user