Merge lp:~openerp-dev/openobject-addons/6.1-opw-584610-nep into lp:openobject-addons/6.1

Proposed by Nehal Panchal (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-584610-nep
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
mail/mail_thread.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-584610-nep
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+144240@code.launchpad.net

Description of the change

Hello,

Emails without subject are not getting fetched from Fetchmail.

This fixes the issue.

Thanks

To post a comment you must log in.
Revision history for this message
Niels Huylebroeck (red15) wrote :

Will likely still cause duplicate key errors? Also would you consider to use .get('subject', _('No subject')) instead ?

Unmerged revisions

7133. By Nehal Panchal (OpenERP)

[FIX] mail: emails without subject are not getting fetched

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mail/mail_thread.py'
2--- mail/mail_thread.py 2012-08-10 11:48:38 +0000
3+++ mail/mail_thread.py 2013-01-22 08:33:22 +0000
4@@ -358,7 +358,7 @@
5 match = tools.reference_re.search(references)
6 if match: res_id = match.group(1)
7 if not res_id:
8- match = tools.res_re.search(msg['subject'])
9+ match = tools.res_re.search(msg.get('subject', ''))
10 if match: res_id = match.group(1)
11 if res_id:
12 res_id = int(res_id)