test: skip invite email if in test
This commit is contained in:
@@ -11,7 +11,11 @@ from frappe.utils.password import get_decrypted_password
|
|||||||
|
|
||||||
class InviteRequest(Document):
|
class InviteRequest(Document):
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
if self.has_value_changed("status") and self.status == "Approved":
|
if (
|
||||||
|
self.has_value_changed("status")
|
||||||
|
and self.status == "Approved"
|
||||||
|
and not frappe.flags.in_test
|
||||||
|
):
|
||||||
self.send_email()
|
self.send_email()
|
||||||
|
|
||||||
def create_user(self, password):
|
def create_user(self, password):
|
||||||
|
|||||||
Reference in New Issue
Block a user