aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-10 22:11:17 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-10 22:11:17 +0200
commit2f1c27e5a115acee28136857a1d0c23c2f140d27 (patch)
treecad308b9c8078648393fce497c82f92951ff647b /src/web/controllers
parentStart to clean generic utils functions. (diff)
downloadnewspipe-2f1c27e5a115acee28136857a1d0c23c2f140d27.tar.gz
newspipe-2f1c27e5a115acee28136857a1d0c23c2f140d27.tar.bz2
newspipe-2f1c27e5a115acee28136857a1d0c23c2f140d27.zip
Fixed a bug in the article controller.
Diffstat (limited to 'src/web/controllers')
-rw-r--r--src/web/controllers/article.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/web/controllers/article.py b/src/web/controllers/article.py
index 37a35023..02c8fc75 100644
--- a/src/web/controllers/article.py
+++ b/src/web/controllers/article.py
@@ -75,7 +75,8 @@ class ArticleController(AbstractController):
attrs['category_id'] = feed.category_id
if attrs.get('category_id'):
cat = CategoryController().get(id=attrs['category_id'])
- assert cat.user_id == user_id, "no right on cat %r" % cat.id
+ assert self.user_id is None or cat.user_id == user_id, \
+ "no right on cat %r" % cat.id
return super().update(filters, attrs)
def get_history(self, year=None, month=None):
bgstack15