removing counters: take two
This commit is contained in:
parent
f3e68e7fb4
commit
159c1826d3
|
@ -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
|
||||
|
||||
|
|
3
model.py
3
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):
|
||||
|
|
Loading…
Reference in New Issue