aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/controllers/article.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-04-22 18:50:54 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-04-23 09:52:22 +0200
commit55520e2aa70a94b697210bfae9f4097ce04a02a1 (patch)
tree52db75138eee48708aef3633d862938d01de0218 /pyaggr3g470r/controllers/article.py
parentFixed strange behaviour of the search when only searching on the content. (diff)
downloadnewspipe-55520e2aa70a94b697210bfae9f4097ce04a02a1.tar.gz
newspipe-55520e2aa70a94b697210bfae9f4097ce04a02a1.tar.bz2
newspipe-55520e2aa70a94b697210bfae9f4097ce04a02a1.zip
enforcing better user of user_id in controllers
thus enhancing rights limitations between users wider_controller are a way to say "I was the maximum rights my role allows me"
Diffstat (limited to 'pyaggr3g470r/controllers/article.py')
-rw-r--r--pyaggr3g470r/controllers/article.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/controllers/article.py b/pyaggr3g470r/controllers/article.py
index bcd73e99..d22911bd 100644
--- a/pyaggr3g470r/controllers/article.py
+++ b/pyaggr3g470r/controllers/article.py
@@ -23,6 +23,6 @@ class ArticleController(AbstractController):
def get_unread(self):
return dict(db.session.query(Article.feed_id, func.count(Article.id))
- .filter(Article.readed == False,
- Article.user_id == self.user_id)
+ .filter(*self._to_filters(readed=False,
+ user_id=self.user_id))
.group_by(Article.feed_id).all())
bgstack15