Skip to content

Commit

Permalink
test: skip certificate email if in test
Browse files Browse the repository at this point in the history
  • Loading branch information
pateljannat committed Nov 6, 2023
1 parent 9aafc17 commit de9cb93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lms/lms/doctype/lms_certificate/lms_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def validate(self):
self.validate_duplicate_certificate()

def after_insert(self):
self.send_mail()
if not frappe.flags.in_test:
self.send_mail()

def send_mail(self):
subject = _("Congratulations on getting certified!")
Expand Down

0 comments on commit de9cb93

Please sign in to comment.