diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-03-22 13:36:49 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-03-22 13:36:49 +0100 |
commit | 0187a4f32f2af5b535b0d87e4a3a1bdf9c5806b5 (patch) | |
tree | adb1b92221e03680cd62d5de8c1921cf812b53d5 /src/web/controllers/feed.py | |
parent | Removed extra info fo rreadability. (diff) | |
download | newspipe-0187a4f32f2af5b535b0d87e4a3a1bdf9c5806b5.tar.gz newspipe-0187a4f32f2af5b535b0d87e4a3a1bdf9c5806b5.tar.bz2 newspipe-0187a4f32f2af5b535b0d87e4a3a1bdf9c5806b5.zip |
check the value of 'category_id'.
Diffstat (limited to 'src/web/controllers/feed.py')
-rw-r--r-- | src/web/controllers/feed.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/controllers/feed.py b/src/web/controllers/feed.py index 95b1eceb..b78d6928 100644 --- a/src/web/controllers/feed.py +++ b/src/web/controllers/feed.py @@ -84,7 +84,9 @@ class FeedController(AbstractController): def update(self, filters, attrs): from .article import ArticleController self._ensure_icon(attrs) - if 'category_id' in attrs: + if not attrs['category_id'] or attrs['category_id'] == 0: + del attrs['category_id'] + else: art_contr = ArticleController(self.user_id) for feed in self.read(**filters): art_contr.update({'feed_id': feed.id}, |