mirror of
https://github.com/codl/forget
synced 2025-01-05 19:56:48 +01:00
fix crash when tweets have been deleted oob
This commit is contained in:
parent
1ba30bdb0a
commit
5b953122c3
@ -126,7 +126,7 @@ def refresh_posts(posts):
|
||||
for post in posts:
|
||||
tweet = next((tweet for tweet in tweets if tweet['id_str'] == post.twitter_id), None)
|
||||
if not tweet:
|
||||
session.delete(post)
|
||||
db.session.delete(post)
|
||||
else:
|
||||
post = db.session.merge(post_from_api_tweet_object(tweet))
|
||||
refreshed_posts.append(post)
|
||||
|
Loading…
Reference in New Issue
Block a user