From 159c1826d3115d9cccda2e506e77103761a08eca Mon Sep 17 00:00:00 2001 From: codl Date: Fri, 14 May 2021 20:32:09 +0200 Subject: [PATCH] removing counters: take two --- libforget/twitter.py | 4 ---- model.py | 3 --- 2 files changed, 7 deletions(-) diff --git a/libforget/twitter.py b/libforget/twitter.py index 078171b..dc0c8b9 100644 --- a/libforget/twitter.py +++ b/libforget/twitter.py @@ -115,10 +115,6 @@ def post_from_api_tweet_object(tweet, post=None): if 'entities' in tweet: post.has_media = bool( 'media' in tweet['entities'] and tweet['entities']['media']) - if 'favorite_count' in tweet: - post.favourites = tweet['favorite_count'] - if 'retweet_count' in tweet: - post.reblogs = tweet['retweet_count'] post.is_reblog = 'retweeted_status' in tweet return post diff --git a/model.py b/model.py index 28d999d..01cfd29 100644 --- a/model.py +++ b/model.py @@ -302,9 +302,6 @@ class Post(db.Model, TimestampMixin, RemoteIDMixin): has_media = db.Column(db.Boolean, server_default='FALSE', nullable=False) direct = db.Column(db.Boolean, server_default='FALSE', nullable=False) - favourites = db.Column(db.Integer) - reblogs = db.Column(db.Integer) - is_reblog = db.Column(db.Boolean, server_default='FALSE', nullable=False) def __str__(self):