From f5a6fc62e109f98bcb11d39c42ab09fc42b12bc6 Mon Sep 17 00:00:00 2001 From: Dennis Jen Date: Tue, 19 Feb 2019 11:52:59 -0500 Subject: [PATCH] Updated ignored ids to just the current posts in get_posts endpoint --- client/app/constants/index.js | 2 +- server/views/feed.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/app/constants/index.js b/client/app/constants/index.js index c6eafc00..8ba4c6a3 100644 --- a/client/app/constants/index.js +++ b/client/app/constants/index.js @@ -18,6 +18,6 @@ export const DELETE_USER_REQUEST = 'DELETE_USER_REQUEST'; export const DELETE_USER_SUCCESS = 'DELETE_USER_SUCCESS'; export const DELETE_USER_FAILURE = 'DELETE_USER_FAILURE'; -export const VERSION = 'v1.12.10'; +export const VERSION = 'v1.12.11'; export const API_URL = ''; // process.env.NODE_ENV === 'production' ? '': 'http://localhost:5000/' diff --git a/server/views/feed.py b/server/views/feed.py index 1e4792b1..8e2c2522 100644 --- a/server/views/feed.py +++ b/server/views/feed.py @@ -19,7 +19,7 @@ def get_posts(): personal_posts = current_user.posts.order_by(Post.created_at.desc())[:PERSONAL_POSTS_MAX] posts_from_quintile = NEWS_POSTS_COUNT / 5 - ignore_ids = [item.id for item in current_user.posts.all()] + ignore_ids = [item.id for item in personal_posts] for quintile in PoliticsEnum: posts = Post.query.filter(( Post.id.notin_(ignore_ids)) & (Post.political_quintile == quintile)).order_by(