diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-07 13:46:35 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-07 13:46:35 +0200 |
commit | c556f75bb700d460f6ddf46daf110ffbba49e42e (patch) | |
tree | 56569f8ee6c5422cc0131857bd991df8adebc9f1 /src/web/models/feed.py | |
parent | Updated CHANGELOG. (diff) | |
download | newspipe-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.py | 10 |
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) |