diff options
-rw-r--r-- | pyaggr3g470r/feedgetter.py | 4 | ||||
-rw-r--r-- | pyaggr3g470r/models.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/pyaggr3g470r/feedgetter.py b/pyaggr3g470r/feedgetter.py index 96917fcf..2539124b 100644 --- a/pyaggr3g470r/feedgetter.py +++ b/pyaggr3g470r/feedgetter.py @@ -149,6 +149,10 @@ class FeedGetter(object): parsed_url.fragment ]) + exist = Article.query.filter(Article.link == nice_url).first() + if exist != None and exist.source.subscriber.id == self.user.id: + continue + description = "" article_title = "" try: diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py index b1cd3448..491e1369 100644 --- a/pyaggr3g470r/models.py +++ b/pyaggr3g470r/models.py @@ -110,7 +110,7 @@ class Article(db.Model): Represent an article from a feed. """ id = db.Column(db.Integer, primary_key = True) - link = db.Column(db.String(), unique = True) + link = db.Column(db.String()) title = db.Column(db.String()) content = db.Column(db.String()) readed = db.Column(db.Boolean(), default=False) |