Message ID | 1448712886-3221-9-git-send-email-mchehab@osg.samsung.com |
---|---|
State | Rejected |
Delegated to: | Stephen Finucane |
Headers | show |
On 28 Nov 10:14, Mauro Carvalho Chehab wrote: > Something broke the output of X-Patchwork-Delegate: via xmlrpc. > > Fix it by moving the code to the xmlrpc part. > > Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> This is all that's needed :) (Well - some UTs also but that's a different matter). Acked-by: Stephen Finucane <stephen.finucane@intel.com>
On 06 Jan 17:20, Finucane, Stephen wrote: > On 28 Nov 10:14, Mauro Carvalho Chehab wrote: > > Something broke the output of X-Patchwork-Delegate: via xmlrpc. > > > > Fix it by moving the code to the xmlrpc part. > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> > > This is all that's needed :) (Well - some UTs also but that's a > different matter). > > Acked-by: Stephen Finucane <stephen.finucane@intel.com> Dropped in favour of patch 11.
diff --git a/patchwork/models.py b/patchwork/models.py index 024ff4d8d5e1..676422d8aae5 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -363,8 +363,6 @@ class Patch(models.Model): time.mktime(self.date.utctimetuple())) mail['From'] = unicode(self.submitter) mail['X-Patchwork-Id'] = str(self.id) - if self.delegate: - mail['X-Patchwork-Delegate'] = str(self.delegate.email) mail['Message-Id'] = self.msgid mail.set_unixfrom('From patchwork ' + self.date.ctime()) diff --git a/patchwork/views/__init__.py b/patchwork/views/__init__.py index 8df8920ce991..20122b733c3c 100644 --- a/patchwork/views/__init__.py +++ b/patchwork/views/__init__.py @@ -205,6 +205,10 @@ def patch_to_mbox(patch): mail['Message-Id'] = patch.msgid mail.set_unixfrom('From patchwork ' + patch.date.ctime()) + try: + mail['X-Patchwork-Delegate'] = str(patch.delegate.email) + except: + pass copied_headers = ['To', 'Cc', 'Date'] orig_headers = HeaderParser().parsestr(str(patch.headers))
Something broke the output of X-Patchwork-Delegate: via xmlrpc. Fix it by moving the code to the xmlrpc part. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> --- patchwork/models.py | 2 -- patchwork/views/__init__.py | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-)