From 8d8a21c6a2adde136602c296b73c76a2d77e7c08 Mon Sep 17 00:00:00 2001 From: codl Date: Wed, 27 Dec 2017 22:00:58 +0100 Subject: [PATCH] take reblogs into account in estimated post count --- model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model.py b/model.py index 049f14a..d6aa960 100644 --- a/model.py +++ b/model.py @@ -174,9 +174,9 @@ class Account(TimestampMixin, RemoteIDMixin): db.func.now() - self.policy_keep_younger) .except_(latest_n_posts)) 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): - query = query.filter_by(has_media=False) + query = query.filter(db.or_(Post.has_media == False, Post.is_reblog)) return query.count() def force_log_out(self):