From 3072dcabb7f8d35f21ebfaeae53a1218ecd9d43e Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 16 Dec 2012 11:53:03 +0100 Subject: Added album view. --- db.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'db.py') diff --git a/db.py b/db.py index ebb5701..57e30c0 100644 --- a/db.py +++ b/db.py @@ -118,6 +118,10 @@ class Album(Base): session.commit() return album + @staticmethod + def get_by_id(session, id): + return session.query(Album).filter(Album.id == id).one() + class Track(Base): __tablename__ = 'tracks' -- cgit v1.2.3