Show More
@@ -347,6 +347,8 def connect_replies(instance, **kwargs): | |||||
347 | try: |
|
347 | try: | |
348 | referenced_post = Post.objects.get(id=post_id) |
|
348 | referenced_post = Post.objects.get(id=post_id) | |
349 |
|
349 | |||
|
350 | # Connect only to posts that are not connected to already | |||
|
351 | if not referenced_post.referenced_posts.filter(id=instance.id).exists(): | |||
350 | referenced_post.referenced_posts.add(instance) |
|
352 | referenced_post.referenced_posts.add(instance) | |
351 | referenced_post.last_edit_time = instance.pub_time |
|
353 | referenced_post.last_edit_time = instance.pub_time | |
352 | referenced_post.build_refmap() |
|
354 | referenced_post.build_refmap() |
General Comments 0
You need to be logged in to leave comments.
Login now