Show More
@@ -99,7 +99,7 b' class PostManager(models.Manager):' | |||||
99 | thread.last_edit_time = timezone.now() |
|
99 | thread.last_edit_time = timezone.now() | |
100 | thread.save() |
|
100 | thread.save() | |
101 |
|
101 | |||
102 | post.delete() |
|
102 | post.delete() | |
103 |
|
103 | |||
104 | def delete_posts_by_ip(self, ip): |
|
104 | def delete_posts_by_ip(self, ip): | |
105 | """ |
|
105 | """ | |
@@ -153,7 +153,7 b' class PostManager(models.Manager):' | |||||
153 | # Maybe make some 'old' field in the model to indicate the thread |
|
153 | # Maybe make some 'old' field in the model to indicate the thread | |
154 | # must not be shown and be able for replying. |
|
154 | # must not be shown and be able for replying. | |
155 |
|
155 | |||
156 |
threads = |
|
156 | threads = self.get_threads() | |
157 | thread_count = threads.count() |
|
157 | thread_count = threads.count() | |
158 |
|
158 | |||
159 | if thread_count > settings.MAX_THREAD_COUNT: |
|
159 | if thread_count > settings.MAX_THREAD_COUNT: | |
@@ -331,7 +331,7 b' class Thread(models.Model):' | |||||
331 | """ |
|
331 | """ | |
332 |
|
332 | |||
333 | if self.replies.count() > 0: |
|
333 | if self.replies.count() > 0: | |
334 |
|
|
334 | self.replies.all().delete() | |
335 |
|
335 | |||
336 | self.delete() |
|
336 | self.delete() | |
337 |
|
337 |
General Comments 0
You need to be logged in to leave comments.
Login now