diff --git a/community/community/doctype/community_member/community_member.json b/community/community/doctype/community_member/community_member.json
index 234bcecd..f0cfdf5c 100644
--- a/community/community/doctype/community_member/community_member.json
+++ b/community/community/doctype/community_member/community_member.json
@@ -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",
diff --git a/community/community/doctype/community_member/community_member.py b/community/community/doctype/community_member/community_member.py
index 294ca812..4966535a 100644
--- a/community/community/doctype/community_member/community_member.py
+++ b/community/community/doctype/community_member/community_member.py
@@ -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",
diff --git a/community/hooks.py b/community/hooks.py
index 5a26ac85..75d4d761 100644
--- a/community/hooks.py
+++ b/community/hooks.py
@@ -149,6 +149,8 @@ whitelist = [
"/sketches",
"/admin",
"/socket.io",
+ "/hackathons",
+ "/dashboard"
]
whitelist_rules = [{"from_route": p, "to_route": p[1:]} for p in whitelist]
diff --git a/community/patches.txt b/community/patches.txt
index 5374512d..fa60560e 100644
--- a/community/patches.txt
+++ b/community/patches.txt
@@ -1 +1,2 @@
-community.patches.set_email_preferences
\ No newline at end of file
+community.patches.set_email_preferences
+community.patches.change_name_for_community_members
\ No newline at end of file
diff --git a/community/patches/change_name_for_community_members.py b/community/patches/change_name_for_community_members.py
new file mode 100644
index 00000000..5d1b7f51
--- /dev/null
+++ b/community/patches/change_name_for_community_members.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+import frappe
+from frappe.model.naming import make_autoname
+from frappe.model.rename_doc import rename_doc
+
+def execute():
+ frappe.reload_doc("community", "doctype", "community_member")
+ docs = frappe.get_all("Community Member")
+ for doc in docs:
+ member = frappe.get_doc("Community Member", doc.name)
+ name = make_autoname("hash", "Community Member")
+ rename_doc("Community Member", member.name, name, force=True, merge=False, ignore_permissions=True, ignore_if_exists=False)
diff --git a/community/www/dashboard/index.html b/community/www/dashboard/index.html
index 2984af66..733dc31f 100644
--- a/community/www/dashboard/index.html
+++ b/community/www/dashboard/index.html
@@ -1,4 +1,5 @@
{% extends "templates/base.html" %}
+{% from "www/macros/profile.html" import profile %}
{% block title %}{{ _("Community") }}{% endblock %}
{% block head_include %}
@@ -86,19 +87,6 @@
{% endblock %}
-{% macro profile(photo, full_name, abbr, icon) %}
-{% if photo %}
-
-{% else %}
-
You have not created any sketches.
+ {% endif %}You have not created any sketches.
- {% endif %}{{ user.short_intro }}
- {% endif %} - {% if user.bio %} -{{ frappe.utils.md_to_html(user.bio) }}
- {% endif %} -