From: Andrew Donnellan Date: Wed, 23 Nov 2016 07:01:31 +0000 (+1100) Subject: views: don't duplicate tags in patch message when generating mbox X-Git-Tag: v2.0.0-rc1~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2941d6f47fd242d53c52e966501fb09e2eb19473;p=thirdparty%2Fpatchwork.git views: don't duplicate tags in patch message when generating mbox When generating an mbox for a patch with tags in the original commit message, e.g.: Example patch This patch is awesome! Signed-off-by: Andrew Donnellan Acked-by: Russell Currey the tags from the original email are duplicated: Example patch This patch is awesome! Signed-off-by: Andrew Donnellan Acked-by: Russell Currey Signed-off-by: Andrew Donnellan Acked-by: Russell Currey It appears that during the refactoring in ef56359fb776 ("models: Merge patch and first comment"), we added a call to patch.patch_responses() to extract the tags from the initial patch email, which we then append to the patch email body... which already has the tags in it. Remove the unnecessary append of patch.patch_responses when generating an mbox. Fixes: ef56359fb776 ("models: Merge patch and first comment") Reported-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Daniel Axtens Reviewed-by: Stephen Finucane --- diff --git a/patchwork/views/__init__.py b/patchwork/views/__init__.py index a29da837..58fb29f8 100644 --- a/patchwork/views/__init__.py +++ b/patchwork/views/__init__.py @@ -368,8 +368,6 @@ def patch_to_mbox(patch): postscript = '' # TODO(stephenfin): Make this use the tags infrastructure - body += patch.patch_responses - for comment in Comment.objects.filter(submission=patch): body += comment.patch_responses