aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-03-22 14:23:06 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-03-22 14:23:06 +0100
commit3e9d26b704e4435a644255ffac9fae106fe9c09c (patch)
tree7cd657dc004f589bd7be2e45741daee18d7ff487
parentcheck the value of 'category_id'. (diff)
downloadnewspipe-3e9d26b704e4435a644255ffac9fae106fe9c09c.tar.gz
newspipe-3e9d26b704e4435a644255ffac9fae106fe9c09c.tar.bz2
newspipe-3e9d26b704e4435a644255ffac9fae106fe9c09c.zip
fix...
-rw-r--r--src/web/controllers/feed.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/web/controllers/feed.py b/src/web/controllers/feed.py
index b78d6928..4bb683e0 100644
--- a/src/web/controllers/feed.py
+++ b/src/web/controllers/feed.py
@@ -84,9 +84,10 @@ class FeedController(AbstractController):
def update(self, filters, attrs):
from .article import ArticleController
self._ensure_icon(attrs)
- if not attrs['category_id'] or attrs['category_id'] == 0:
+ if 'category_id' in attrs and attrs['category_id'] == 0:
del attrs['category_id']
- else:
+ elif 'category_id' in attrs:
+ print(attrs['category_id'])
art_contr = ArticleController(self.user_id)
for feed in self.read(**filters):
art_contr.update({'feed_id': feed.id},
bgstack15