Show More
@@ -347,10 +347,12 b' def connect_replies(instance, **kwargs):' | |||
|
347 | 347 | try: |
|
348 | 348 | referenced_post = Post.objects.get(id=post_id) |
|
349 | 349 | |
|
350 | referenced_post.referenced_posts.add(instance) | |
|
351 | referenced_post.last_edit_time = instance.pub_time | |
|
352 |
referenced_post. |
|
|
353 | referenced_post.save(update_fields=['refmap', 'last_edit_time']) | |
|
350 | # Connect only to posts that are not connected to already | |
|
351 | if not referenced_post.referenced_posts.filter(id=instance.id).exists(): | |
|
352 | referenced_post.referenced_posts.add(instance) | |
|
353 | referenced_post.last_edit_time = instance.pub_time | |
|
354 | referenced_post.build_refmap() | |
|
355 | referenced_post.save(update_fields=['refmap', 'last_edit_time']) | |
|
354 | 356 | except ObjectDoesNotExist: |
|
355 | 357 | pass |
|
356 | 358 |
General Comments 0
You need to be logged in to leave comments.
Login now