fix(event/sync_communication): add distinct while querying communication links
There's cases where these are duplicated Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
cd189b3f7f
commit
da1fb2ff4e
1 changed files with 1 additions and 3 deletions
|
|
@ -121,9 +121,7 @@ class Event(Document):
|
|||
["Communication Link", "link_doctype", "=", participant.reference_doctype],
|
||||
["Communication Link", "link_name", "=", participant.reference_docname],
|
||||
]
|
||||
comms = frappe.get_all("Communication", filters=filters, fields=["name"])
|
||||
|
||||
if comms:
|
||||
if comms := frappe.get_all("Communication", filters=filters, fields=["name"], distinct=True):
|
||||
for comm in comms:
|
||||
communication = frappe.get_doc("Communication", comm.name)
|
||||
self.update_communication(participant, communication)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue