Show More
@@ -152,9 +152,10 b' class Post(models.Model, Viewable):' | |||
|
152 | 152 | url = self.url |
|
153 | 153 | |
|
154 | 154 | if url is None: |
|
155 |
opening |
|
|
155 | opening = self.is_opening() | |
|
156 | opening_id = self.id if opening else thread.get_opening_post_id() | |
|
156 | 157 | url = reverse('thread', kwargs={'post_id': opening_id}) |
|
157 |
if |
|
|
158 | if not opening: | |
|
158 | 159 | url += '#' + str(self.id) |
|
159 | 160 | |
|
160 | 161 | return url |
@@ -292,8 +293,7 b' class Post(models.Model, Viewable):' | |||
|
292 | 293 | |
|
293 | 294 | super().save(force_insert, force_update, using, update_fields) |
|
294 | 295 | |
|
295 | # Post save triggers | |
|
296 | if new_post: | |
|
296 | if self.url is None: | |
|
297 | 297 | self.build_url() |
|
298 | 298 | |
|
299 | 299 | self._connect_replies() |
General Comments 0
You need to be logged in to leave comments.
Login now