mirror of
https://github.com/simon987/nyaa.git
synced 2025-04-20 10:46:42 +00:00
Redundant query
This commit is contained in:
parent
ec0f8000d7
commit
04c9ef6685
@ -422,11 +422,7 @@ class Report(db.Model):
|
||||
|
||||
@classmethod
|
||||
def not_reviewed(cls, page):
|
||||
reports = cls.query.filter(cls.status == 0)\
|
||||
.join(Torrent, aliased=True).filter(Torrent.flags != 36, Torrent.flags != 2)\
|
||||
.order_by(db.asc(cls.id))\
|
||||
.paginate(page=page, per_page=20)
|
||||
# reports = cls.query.filter_by(status=0).paginate(page=page, per_page=20)
|
||||
reports = cls.query.filter_by(status=0).paginate(page=page, per_page=20)
|
||||
return reports
|
||||
|
||||
@classmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user