# HG changeset patch # User neko259 # Date 2016-01-02 23:13:28 # Node ID b6b80f850767c4a930ae5b8f278ca598e660ad76 # Parent ee8a1842330a64512a9d92454e5246c9f9585db1 Prevent posting into an archived thread diff --git a/boards/models/post/manager.py b/boards/models/post/manager.py --- a/boards/models/post/manager.py +++ b/boards/models/post/manager.py @@ -36,6 +36,9 @@ class PostManager(models.Manager): Creates new post """ + if thread is not None and thread.is_archived(): + raise Exception('Cannot post into an archived thread') + if not utils.is_anonymous_mode(): is_banned = Ban.objects.filter(ip=ip).exists() else: