Skip to content

Commit

Permalink
test: skip invite 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 de9cb93 commit 929f97c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lms/lms/doctype/invite_request/invite_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@

class InviteRequest(Document):
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()

def create_user(self, password):
Expand Down

0 comments on commit 929f97c

Please sign in to comment.