Show More
@@ -66,6 +66,13 b' class PostManager(models.Manager):' | |||
|
66 | 66 | def delete_post(self, post): |
|
67 | 67 | if post.replies.count() > 0: |
|
68 | 68 | map(self.delete_post, post.replies.all()) |
|
69 | ||
|
70 | # Update thread's last edit time (used as cache key) | |
|
71 | thread = post.thread | |
|
72 | if thread: | |
|
73 | thread.last_edit_time = timezone.now() | |
|
74 | thread.save() | |
|
75 | ||
|
69 | 76 | post.delete() |
|
70 | 77 | |
|
71 | 78 | def delete_posts_by_ip(self, ip): |
General Comments 0
You need to be logged in to leave comments.
Login now