fix: fetch always fetching all tweets

This commit is contained in:
codl 2017-07-29 18:10:40 +02:00
parent 079cb51b7f
commit 9b4c6b6404
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ def fetch_acc(account, cursor, consumer_key=None, consumer_secret=None):
kwargs.update(cursor or {})
if 'max_id' not in kwargs:
most_recent_post = Post.query.order_by(db.desc(Post.created_at)).filter(Post.author_id == account.twitter_id).first()
most_recent_post = Post.query.order_by(db.desc(Post.created_at)).filter(Post.author_id == account.id).first()
if most_recent_post:
kwargs['since_id'] = most_recent_post.twitter_id