This commit is contained in:
codl 2017-09-21 07:26:01 +02:00
parent eb6fcd700a
commit 0e185c67a5
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 3 additions and 3 deletions

View File

@ -125,12 +125,12 @@ def fetch_acc(acc, cursor=None):
statuses = api.account_statuses(acc.mastodon_id, **kwargs)
if statuses:
kwargs['max_id'] = +inf
for status in statuses:
post = post_from_api_object(status, acc.mastodon_instance)
db.session.merge(post)
kwargs['max_id'] = min(kwargs['max_id'], status['id'])
if 'max_id' not in kwargs:
kwargs['max_id'] = status['id']
kwargs['max_id'] = min(int(kwargs['max_id']), int(status['id']))
else:
kwargs = None