From: Gael Le Mignot Date: Tue, 25 Jun 2024 11:28:13 +0000 (+0200) Subject: Added parent and thread identifiers X-Git-Tag: 2.11.0~7 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=97a7b1eced197ba7be38628ca7dc625f06528fca;p=teleforma.git Added parent and thread identifiers --- diff --git a/teleforma/management/commands/teleforma-get-postman-replies.py b/teleforma/management/commands/teleforma-get-postman-replies.py index f8588272..c90ebf6b 100644 --- a/teleforma/management/commands/teleforma-get-postman-replies.py +++ b/teleforma/management/commands/teleforma-get-postman-replies.py @@ -113,8 +113,12 @@ class Command(BaseCommand): del lines[-1] body = '\n'.join(lines) - mess = Message(sender=msg.recipient, recipient=msg.sender, - subject=subject, body=body) + if not msg.thread: + msg.thread = msg + + mess = Message(sender = msg.recipient, recipient = msg.sender, + subject = subject, body = body, thread = msg.thread, + parent = msg) mess.moderation_status = 'a' mess.save() site = Site.objects.all()[0]