diff options
Diffstat (limited to 'pyaggr3g470r/controllers')
-rw-r--r-- | pyaggr3g470r/controllers/abstract.py | 1 | ||||
-rw-r--r-- | pyaggr3g470r/controllers/feed.py | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/pyaggr3g470r/controllers/abstract.py b/pyaggr3g470r/controllers/abstract.py index a99e67f3..c084deb9 100644 --- a/pyaggr3g470r/controllers/abstract.py +++ b/pyaggr3g470r/controllers/abstract.py @@ -1,6 +1,5 @@ import logging from bootstrap import db -from sqlalchemy import update from werkzeug.exceptions import Forbidden, NotFound logger = logging.getLogger(__name__) diff --git a/pyaggr3g470r/controllers/feed.py b/pyaggr3g470r/controllers/feed.py index a3cdcddd..342ab88e 100644 --- a/pyaggr3g470r/controllers/feed.py +++ b/pyaggr3g470r/controllers/feed.py @@ -1,4 +1,4 @@ -from datetime import datetime, timedelta +from datetime import datetime from .abstract import AbstractController from pyaggr3g470r.models import Feed @@ -17,7 +17,7 @@ class FeedController(AbstractController): feeds = [feed for feed in self.read(user_id=self.user_id, error_count__lt=max_error, enabled=True).limit(limit)] #last_retrieved__lt=max_last).limit(limit)] - """if feeds: + if feeds: self.update({'id__in': [feed.id for feed in feeds]}, - {'last_retrieved': now})""" + {'last_retrieved': now}) return feeds |