Merge pull request #672 from pateljannat/user-category-default
fix: default user category
This commit is contained in:
@@ -138,12 +138,12 @@
|
||||
"label": "User Category",
|
||||
"length": 0,
|
||||
"mandatory_depends_on": null,
|
||||
"modified": "2022-04-19 13:02:18.219508",
|
||||
"modified": "2022-04-19 13:02:18.219510",
|
||||
"module": "LMS",
|
||||
"name": "User-user_category",
|
||||
"no_copy": 0,
|
||||
"non_negative": 0,
|
||||
"options": "Business Owner\nManager (Sales/Marketing/Customer)\nEmployee\nStudent\nFreelancer/Just looking\nOthers",
|
||||
"options": "\nBusiness Owner\nManager (Sales/Marketing/Customer)\nEmployee\nStudent\nFreelancer/Just looking\nOthers",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
|
||||
@@ -11,7 +11,11 @@ from frappe.utils.password import get_decrypted_password
|
||||
|
||||
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):
|
||||
|
||||
@@ -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