fix: patch to update name of member

This commit is contained in:
pateljannat
2021-04-12 18:05:43 +05:30
parent 0e1002392f
commit d38c64650e
8 changed files with 43 additions and 47 deletions

View File

@@ -2,7 +2,6 @@
"actions": [],
"allow_guest_to_view": 1,
"allow_rename": 1,
"autoname": "field:email",
"creation": "2021-02-12 15:47:23.591567",
"doctype": "DocType",
"editable_grid": 1,
@@ -108,7 +107,7 @@
"has_web_view": 1,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-04-12 13:34:41.573486",
"modified": "2021-04-12 17:32:36.211603",
"modified_by": "Administrator",
"module": "Community",
"name": "Community Member",

View File

@@ -27,10 +27,6 @@ class CommunityMember(WebsiteGenerator):
frappe.throw(_("Username can only contain alphabets, numbers and underscore."))
self.username = self.username.lower()
def on_update(self):
if self.username != self.name:
rename_doc(self.doctype, self.name, self.username, force=False, merge=False, ignore_permissions=True, ignore_if_exists=False)
def create_member_from_user(doc, method):
member = frappe.get_doc({
"doctype": "Community Member",