take reblogs into account in estimated post count
This commit is contained in:
parent
f2cdc30c9e
commit
8d8a21c6a2
4
model.py
4
model.py
|
@ -174,9 +174,9 @@ class Account(TimestampMixin, RemoteIDMixin):
|
||||||
db.func.now() - self.policy_keep_younger)
|
db.func.now() - self.policy_keep_younger)
|
||||||
.except_(latest_n_posts))
|
.except_(latest_n_posts))
|
||||||
if(self.policy_keep_favourites):
|
if(self.policy_keep_favourites):
|
||||||
query = query.filter_by(favourite=False)
|
query = query.filter(db.or_(Post.favourite == False, Post.is_reblog))
|
||||||
if(self.policy_keep_media):
|
if(self.policy_keep_media):
|
||||||
query = query.filter_by(has_media=False)
|
query = query.filter(db.or_(Post.has_media == False, Post.is_reblog))
|
||||||
return query.count()
|
return query.count()
|
||||||
|
|
||||||
def force_log_out(self):
|
def force_log_out(self):
|
||||||
|
|
Loading…
Reference in New Issue