Revert "make sure post id is an actual integer"

This reverts commit e9653f34be.
This commit is contained in:
codl 2017-09-21 07:24:18 +02:00
parent 1123d44b30
commit eb6fcd700a
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ def fetch_acc(acc, cursor=None):
for status in statuses:
post = post_from_api_object(status, acc.mastodon_instance)
db.session.merge(post)
kwargs['max_id'] = min(kwargs['max_id'], post.mastodon_id)
kwargs['max_id'] = min(kwargs['max_id'], status['id'])
else:
kwargs = None
@ -147,7 +147,7 @@ def fetch_acc(acc, cursor=None):
def post_from_api_object(obj, instance):
return Post(
mastodon_instance=instance,
mastodon_id=int(obj['id']),
mastodon_id=obj['id'],
favourite=obj['favourited'],
has_media=('media_attachments' in obj
and bool(obj['media_attachments'])),