From 02c04ce893ad58f3067e87aaae25785703b85179 Mon Sep 17 00:00:00 2001 From: nyaadev Date: Thu, 25 May 2017 00:36:49 +0200 Subject: [PATCH] order torrent.trackers relation --- nyaa/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nyaa/models.py b/nyaa/models.py index ec1e56a..d204c5c 100755 --- a/nyaa/models.py +++ b/nyaa/models.py @@ -100,7 +100,7 @@ class Torrent(db.Model): stats = db.relationship('Statistic', uselist=False, cascade="all, delete-orphan", back_populates='torrent', lazy='joined') trackers = db.relationship('TorrentTrackers', uselist=True, - cascade="all, delete-orphan", lazy='joined') + cascade="all, delete-orphan", lazy='joined', order_by='TorrentTrackers.order') comments = db.relationship('Comment', uselist=True, cascade="all, delete-orphan")