Commit 7c5275b6 authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] mail: to prevent infinite loop

Introduced by fac04424
parent 7f02fc9e
......@@ -884,7 +884,8 @@ class mail_message(osv.Model):
# the parent message -> add a read notification for the parent
if message.parent_id:
parent_id = message.parent_id
while parent_id:
check = set()
while parent_id and parent_id not in check:
# all notified_partner_ids of the mail.message have to be notified for the parented messages
partners_to_parent_notify = set(message.notified_partner_ids).difference(parent_id.notified_partner_ids)
for partner in partners_to_parent_notify:
......@@ -893,4 +894,5 @@ class mail_message(osv.Model):
'is_read': True,
}, context=context)
parent_id = parent_id.parent_id
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment