fix update user properties patch

This commit is contained in:
Pratik Vyas
2014-05-10 22:16:39 +05:30
parent 34e36a233c
commit 95f558e7bc
2 changed files with 6 additions and 5 deletions

View File

@@ -155,6 +155,8 @@ class Employee(Document):
throw(_("Please enter relieving date."))
def validate_for_enabled_user_id(self):
if not self.status == 'Active':
return
enabled = frappe.db.sql("""select name from `tabUser` where
name=%s and enabled=1""", self.user_id)
if not enabled: