fix: consider reference docname when reference doctype is Contact when setting participant emails in event doctype (#18463)
This commit is contained in:
parent
1e2370ffd3
commit
1bf384f81d
1 changed files with 7 additions and 3 deletions
|
|
@ -143,9 +143,13 @@ class Event(Document):
|
|||
if participant.email:
|
||||
continue
|
||||
|
||||
participant_contact = get_default_contact(
|
||||
participant.reference_doctype, participant.reference_docname
|
||||
)
|
||||
if participant.reference_doctype != "Contact":
|
||||
participant_contact = get_default_contact(
|
||||
participant.reference_doctype, participant.reference_docname
|
||||
)
|
||||
else:
|
||||
participant_contact = participant.reference_docname
|
||||
|
||||
participant.email = (
|
||||
frappe.get_value("Contact", participant_contact, "email_id") if participant_contact else None
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue