minor fixes for member (#13101)

This commit is contained in:
Zarrar 2018-02-27 11:00:47 +05:30 committed by Nabin Hait
parent e53a238665
commit 033eb779d4
2 changed files with 6 additions and 7 deletions

View File

@ -38,8 +38,11 @@ frappe.ui.form.on('Member', {
]
},
callback: function (data) {
frappe.model.set_value(frm.doctype,frm.docname, "membership_expiry_date", data.message.to_date);
if(data.message) {
frappe.model.set_value(frm.doctype,frm.docname,
"membership_expiry_date", data.message.to_date);
}
}
});
}
});
});

View File

@ -6,7 +6,6 @@ from __future__ import unicode_literals
from frappe.model.document import Document
from frappe.contacts.address_and_contact import load_address_and_contact
STANDARD_USERS = ("Guest", "Administrator")
class Member(Document):
def onload(self):
@ -15,10 +14,7 @@ class Member(Document):
def validate(self):
if self.name not in STANDARD_USERS:
self.validate_email_type(self.email)
self.validate_email_type(self.name)
self.validate_email_type(self.email)
def validate_email_type(self, email):
from frappe.utils import validate_email_add