Skip to content

Commit

Permalink
Updated ignored ids to just the current posts in get_posts endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
dsjen committed Feb 19, 2019
1 parent 6000a74 commit f5a6fc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/app/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
2 changes: 1 addition & 1 deletion server/views/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f5a6fc6

Please sign in to comment.