Skip to content

Commit

Permalink
[FIX] Singleton required
Browse files Browse the repository at this point in the history
  • Loading branch information
antespi committed Sep 7, 2016
1 parent 36cab84 commit 07a28ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mail_tracking/models/mail_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _message_read_dict_postprocess(self, messages, message_tree):
tracking_email = self.env['mail.tracking.email'].search([
('mail_message_id', '=', mail_message_id),
('partner_id', '=', partner_id),
])
], limit=1)

This comment has been minimized.

Copy link
@pedrobaeza

pedrobaeza Sep 7, 2016

Member

Is _order correct for getting last status?

This comment has been minimized.

Copy link
@antespi

antespi Sep 7, 2016

Author Contributor

There should be only one tracking per mail.message and partner

This comment has been minimized.

Copy link
@pedrobaeza

pedrobaeza Sep 7, 2016

Member

But why is there two then?

This comment has been minimized.

Copy link
@antespi

antespi Sep 8, 2016

Author Contributor

I don't know, but we got one case in production environment. With this change we are sure that only one tracking email is considered

status = self._partner_tracking_status_get(tracking_email)
partner_trackings[str(partner_id)] = (
status, tracking_email.id)
Expand Down

0 comments on commit 07a28ce

Please sign in to comment.