aboutsummaryrefslogtreecommitdiff
path: root/src/web/models/feed.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-07 13:46:35 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-07 13:46:35 +0200
commitc556f75bb700d460f6ddf46daf110ffbba49e42e (patch)
tree56569f8ee6c5422cc0131857bd991df8adebc9f1 /src/web/models/feed.py
parentUpdated CHANGELOG. (diff)
downloadnewspipe-c556f75bb700d460f6ddf46daf110ffbba49e42e.tar.gz
newspipe-c556f75bb700d460f6ddf46daf110ffbba49e42e.tar.bz2
newspipe-c556f75bb700d460f6ddf46daf110ffbba49e42e.zip
Fixed a bug for non-administor users.
Diffstat (limited to 'src/web/models/feed.py')
-rw-r--r--src/web/models/feed.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/web/models/feed.py b/src/web/models/feed.py
index ba9255e9..cc734c41 100644
--- a/src/web/models/feed.py
+++ b/src/web/models/feed.py
@@ -62,5 +62,15 @@ class Feed(db.Model, RightMixin):
cascade='all,delete-orphan',
order_by=desc("date"))
+ # api whitelists
+ @staticmethod
+ def _fields_base_write():
+ return {'title', 'description', 'link', 'site_link', 'enabled',
+ 'filters', 'last_error', 'error_count', 'category_id'}
+
+ @staticmethod
+ def _fields_base_read():
+ return {'id', 'user_id', 'icon_url', 'last_retrieved'}
+
def __repr__(self):
return '<Feed %r>' % (self.title)
bgstack15