Show More
@@ -83,15 +83,13 b' class PostManager(models.Manager):' | |||
|
83 | 83 | opening_posts = [] |
|
84 | 84 | |
|
85 | 85 | posting_time = timezone.now() |
|
86 | new_thread = False | |
|
86 | 87 | if not thread: |
|
87 | 88 | thread = boards.models.thread.Thread.objects.create( |
|
88 | 89 | bump_time=posting_time, last_edit_time=posting_time) |
|
89 | 90 | list(map(thread.tags.add, tags)) |
|
90 | 91 | boards.models.thread.Thread.objects.process_oldest_threads() |
|
91 | else: | |
|
92 | thread.last_edit_time = posting_time | |
|
93 | thread.bump() | |
|
94 | thread.save() | |
|
92 | new_thread = True | |
|
95 | 93 | |
|
96 | 94 | pre_text = Parser().preparse(text) |
|
97 | 95 | |
@@ -115,6 +113,12 b' class PostManager(models.Manager):' | |||
|
115 | 113 | post.connect_threads(opening_posts) |
|
116 | 114 | post.connect_notifications() |
|
117 | 115 | |
|
116 | # Thread needs to be bumped only when the post is already created | |
|
117 | if not new_thread: | |
|
118 | thread.last_edit_time = posting_time | |
|
119 | thread.bump() | |
|
120 | thread.save() | |
|
121 | ||
|
118 | 122 | return post |
|
119 | 123 | |
|
120 | 124 | def delete_posts_by_ip(self, ip): |
General Comments 0
You need to be logged in to leave comments.
Login now