From 2f1c27e5a115acee28136857a1d0c23c2f140d27 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 10 Apr 2016 22:11:17 +0200 Subject: Fixed a bug in the article controller. --- src/web/controllers/article.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/web') 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): -- cgit