summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-08-24 14:33:58 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-08-24 14:33:58 +0200
commite75a735a5cfe5f0c43315a9156e943277bf1e612 (patch)
tree8c2d2e99180d2fae758f3f95c4fd02a164e401fa
parent49c16694118f44d3f02da2e068aff5c3f595be68 (diff)
Fixed join order in Track.search().
-rw-r--r--db.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/db.py b/db.py
index d71a717..1295a89 100644
--- a/db.py
+++ b/db.py
@@ -133,7 +133,7 @@ class Track(Base):
def search(session, *args, **kwargs):
r = session.query(Track)
s_or = []
- for f, n in ((Artist, 'artist'), (Track, 'title'), (Album, 'album')):
+ for f, n in ((Track, 'title'), (Album, 'album'), (Artist, 'artist')):
if f != Track:
r = r.join(f)
if n in kwargs: