Show More
@@ -422,7 +422,7 b' class Post(models.Model, Viewable):' | |||||
422 |
|
422 | |||
423 | # If post is in this thread, its thread was already notified. |
|
423 | # If post is in this thread, its thread was already notified. | |
424 | # Otherwise, notify its thread separately. |
|
424 | # Otherwise, notify its thread separately. | |
425 | if ref_post.thread_id != thread_id: |
|
425 | if ref_post.thread_new_id != thread_id: | |
426 | ref_post.send_to_websocket(request, recursive=False) |
|
426 | ref_post.send_to_websocket(request, recursive=False) | |
427 |
|
427 | |||
428 | def save(self, force_insert=False, force_update=False, using=None, |
|
428 | def save(self, force_insert=False, force_update=False, using=None, |
@@ -122,20 +122,14 b' class ThreadView(BaseBoardView, PostMixi' | |||||
122 |
|
122 | |||
123 | title = data[FORM_TITLE] |
|
123 | title = data[FORM_TITLE] | |
124 | text = data[FORM_TEXT] |
|
124 | text = data[FORM_TEXT] | |
|
125 | image = data.get(FORM_IMAGE) | |||
125 |
|
126 | |||
126 | text = self._remove_invalid_links(text) |
|
127 | text = self._remove_invalid_links(text) | |
127 |
|
128 | |||
128 | if FORM_IMAGE in list(data.keys()): |
|
|||
129 | image = data[FORM_IMAGE] |
|
|||
130 | else: |
|
|||
131 | image = None |
|
|||
132 |
|
||||
133 | tags = [] |
|
|||
134 |
|
||||
135 | post_thread = opening_post.get_thread() |
|
129 | post_thread = opening_post.get_thread() | |
136 |
|
130 | |||
137 | post = Post.objects.create_post(title=title, text=text, image=image, |
|
131 | post = Post.objects.create_post(title=title, text=text, image=image, | |
138 |
thread=post_thread, ip=ip |
|
132 | thread=post_thread, ip=ip) | |
139 | post.send_to_websocket(request) |
|
133 | post.send_to_websocket(request) | |
140 |
|
134 | |||
141 | thread_to_show = (opening_post.id if opening_post else post.id) |
|
135 | thread_to_show = (opening_post.id if opening_post else post.id) |
General Comments 0
You need to be logged in to leave comments.
Login now