test: skip certificate email if in test
This commit is contained in:
@@ -14,7 +14,8 @@ class LMSCertificate(Document):
|
||||
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!")
|
||||
|
||||
Reference in New Issue
Block a user