diff --git a/boards/models/post.py b/boards/models/post.py --- a/boards/models/post.py +++ b/boards/models/post.py @@ -73,12 +73,6 @@ class PostManager(models.Manager): last_edit_time=posting_time) new_thread = True else: - thread.bump() - thread.last_edit_time = posting_time - if thread.can_bump() and ( - thread.get_reply_count() >= settings.MAX_POSTS_PER_THREAD): - thread.bumpable = False - thread.save() new_thread = False pre_text = self._preparse_text(text) @@ -108,6 +102,11 @@ class PostManager(models.Manager): if new_thread: Thread.objects.process_oldest_threads() + else: + thread.bump() + thread.last_edit_time = posting_time + thread.save() + self.connect_replies(post) return post diff --git a/boards/models/thread.py b/boards/models/thread.py --- a/boards/models/thread.py +++ b/boards/models/thread.py @@ -72,6 +72,9 @@ class Thread(models.Model): if self.can_bump(): self.bump_time = timezone.now() + if self.get_reply_count() >= settings.MAX_POSTS_PER_THREAD: + self.bumpable = False + logger.info('Bumped thread %d' % self.id) def get_reply_count(self):