Prevent bumping a thread when it's stickied

This prevents all stickied threads from having their own bump order. We
want stickies to all stay in the same order.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-06-30 18:58:43 -07:00
parent e56832ab1b
commit bbe0765f38

View File

@@ -204,6 +204,7 @@ def post_created(sender, instance, created, **kwargs):
instance.bump instance.bump
and instance.op.bump and instance.op.bump
and instance.op.replies.count() < instance.board.autosink and instance.op.replies.count() < instance.board.autosink
and not instance.op.sticky
): ):
instance.op.last_bump = timezone.now() instance.op.last_bump = timezone.now()
instance.op.save() instance.op.save()