aboutsummaryrefslogtreecommitdiff
path: root/src/web/models
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-10-12 21:56:48 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:46:31 +0100
commit2ca3246de2b7b54452ba7d996064ae32258f9cd3 (patch)
tree54c49c2b94827b90b379ae3748561ef39cfb2026 /src/web/models
parentadding, improving UI to manage categories (diff)
downloadnewspipe-2ca3246de2b7b54452ba7d996064ae32258f9cd3.tar.gz
newspipe-2ca3246de2b7b54452ba7d996064ae32258f9cd3.tar.bz2
newspipe-2ca3246de2b7b54452ba7d996064ae32258f9cd3.zip
fixing sqlalchemy resolving warning
Diffstat (limited to 'src/web/models')
-rw-r--r--src/web/models/article.py4
-rw-r--r--src/web/models/feed.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/web/models/article.py b/src/web/models/article.py
index 44a4234d..2a5f4329 100644
--- a/src/web/models/article.py
+++ b/src/web/models/article.py
@@ -54,7 +54,7 @@ class Article(db.Model):
"""
return Article.query.filter(Article.date < self.date,
Article.feed_id == self.feed_id)\
- .order_by(desc("Article.date")).first()
+ .order_by(desc("date")).first()
def next_article(self):
"""
@@ -62,7 +62,7 @@ class Article(db.Model):
"""
return Article.query.filter(Article.date > self.date,
Article.feed_id == self.feed_id)\
- .order_by(asc("Article.date")).first()
+ .order_by(asc("date")).first()
def __repr__(self):
return "<Article(id=%d, entry_id=%s, title=%r, " \
diff --git a/src/web/models/feed.py b/src/web/models/feed.py
index 87616e02..9d08a972 100644
--- a/src/web/models/feed.py
+++ b/src/web/models/feed.py
@@ -59,7 +59,7 @@ class Feed(db.Model):
category_id = db.Column(db.Integer(), db.ForeignKey('category.id'))
articles = db.relationship('Article', backref='source', lazy='dynamic',
cascade='all,delete-orphan',
- order_by=desc("Article.date"))
+ order_by=desc("date"))
def __repr__(self):
return '<Feed %r>' % (self.title)
bgstack15