take reblogs into account in estimated post count

This commit is contained in:
codl 2017-12-27 22:00:58 +01:00
parent f2cdc30c9e
commit 8d8a21c6a2
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 2 additions and 2 deletions

View File

@ -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):