aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyaggr3g470r/models.py3
-rw-r--r--pyaggr3g470r/views.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py
index 2c94e960..90801edc 100644
--- a/pyaggr3g470r/models.py
+++ b/pyaggr3g470r/models.py
@@ -44,8 +44,7 @@ class Feed(EmbeddedDocument):
}
def __eq__(self, other):
- return self.title == other.title
-
+ return self.oid == other.oid
def __str__(self):
return 'Feed: %s' % self.title
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index f93f276f..c390ddc0 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -147,8 +147,7 @@ def articles(feed_id=None):
user = models.User.objects(email=g.user.email, feeds__oid=feed_id).first()
for feed in user.feeds:
if str(feed.oid) == feed_id:
- #feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
- return render_template('articles.html', feed=feed)
+ return render_template('articles.html', feed=user.feeds[0])
@app.route('/favorites/', methods=['GET'])
@login_required
bgstack15