From 5377904830230ee389fd0a548a92ea43b039153b Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 2 Aug 2019 21:22:00 +0530 Subject: [PATCH] refactor: removed dead code --- .../conference_participant.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py b/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py index fea331bd..b8f99278 100644 --- a/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py +++ b/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py @@ -9,27 +9,10 @@ from frappe.model.document import Document class ConferenceParticipant(Document): def validate(self): self.conference = '2019' - # self.send_ticket_mail() def validate_payment(self): self.amount = self.full_conference_tickets * (5000 if self.currency == 'INR' else 70) def on_payment_authorized(self, status_changed_to=None): self.paid = 1 - self.save(ignore_permissions=True) - - def send_ticket_mail(self): - if self.paid == 1 and self.email: - message = """Thank you for participating in the ERPNext Conference {0}. -
You can find your ticket attached with this email, - for more details about the conference please visit https://erpnext.com/conf/{0}""".format(self.conference) - email_args = { - "recipients": [self.email], - "message": message, - "subject": 'Your Ticket for ERPNext Conference 2019', - "attachments": [frappe.attach_print(self.doctype, self.name, file_name=self.name, print_format='Conference Ticket')], - "reference_doctype": self.doctype, - "reference_name": self.name - } - frappe.sendmail(**email_args) - self.thank_you_email_sent = 1 \ No newline at end of file + self.save(ignore_permissions=True) \ No newline at end of file