diff --git a/frappe/database/schema.py b/frappe/database/schema.py
index 11948eda66..e65d7b980b 100644
--- a/frappe/database/schema.py
+++ b/frappe/database/schema.py
@@ -247,7 +247,6 @@ class DbColumn:
self.default_changed(current_def)
and (self.default not in frappe.db.DEFAULT_SHORTCUTS)
and not cstr(self.default).startswith(":")
- and not (column_type in ["text", "longtext"])
):
self.table.set_default.append(self)
diff --git a/frappe/email/doctype/notification/notification.py b/frappe/email/doctype/notification/notification.py
index 2efbf597ec..aee68aa4e5 100644
--- a/frappe/email/doctype/notification/notification.py
+++ b/frappe/email/doctype/notification/notification.py
@@ -282,19 +282,8 @@ def get_context(context):
email_ids = email_ids_value.replace(",", "\n")
recipients = recipients + email_ids.split("\n")
- if recipient.cc and "{" in recipient.cc:
- recipient.cc = frappe.render_template(recipient.cc, context)
-
- if recipient.cc:
- recipient.cc = recipient.cc.replace(",", "\n")
- cc = cc + recipient.cc.split("\n")
-
- if recipient.bcc and "{" in recipient.bcc:
- recipient.bcc = frappe.render_template(recipient.bcc, context)
-
- if recipient.bcc:
- recipient.bcc = recipient.bcc.replace(",", "\n")
- bcc = bcc + recipient.bcc.split("\n")
+ cc.extend(get_emails_from_template(recipient.cc, context))
+ bcc.extend(get_emails_from_template(recipient.bcc, context))
# For sending emails to specified role
if recipient.receiver_by_role:
@@ -485,3 +474,11 @@ def get_assignees(doc):
recipients = [d.allocated_to for d in assignees]
return recipients
+
+
+def get_emails_from_template(template, context):
+ if not template:
+ return ()
+
+ emails = frappe.render_template(template, context) if "{" in template else template
+ return filter(None, emails.replace(",", "\n").split("\n"))
diff --git a/frappe/model/document.py b/frappe/model/document.py
index 8477d35418..75c3a005c9 100644
--- a/frappe/model/document.py
+++ b/frappe/model/document.py
@@ -967,9 +967,11 @@ class Document(BaseDocument):
return
def _evaluate_alert(alert):
- if not alert.name in self.flags.notifications_executed:
- evaluate_alert(self, alert.name, alert.event)
- self.flags.notifications_executed.append(alert.name)
+ if alert.name in self.flags.notifications_executed:
+ return
+
+ evaluate_alert(self, alert.name, alert.event)
+ self.flags.notifications_executed.append(alert.name)
event_map = {
"on_update": "Save",
diff --git a/frappe/public/js/frappe/desk.js b/frappe/public/js/frappe/desk.js
index f92bb3a1bf..fba4678cbb 100644
--- a/frappe/public/js/frappe/desk.js
+++ b/frappe/public/js/frappe/desk.js
@@ -38,7 +38,6 @@ frappe.Application = class Application {
this.load_user_permissions();
this.make_nav_bar();
this.set_favicon();
- this.setup_analytics();
this.set_fullwidth_if_enabled();
this.add_browser_class();
this.setup_energy_point_listeners();
@@ -512,18 +511,6 @@ frappe.Application = class Application {
});
}
- setup_analytics() {
- if (window.mixpanel) {
- window.mixpanel.identify(frappe.session.user);
- window.mixpanel.people.set({
- $first_name: frappe.boot.user.first_name,
- $last_name: frappe.boot.user.last_name,
- $created: frappe.boot.user.creation,
- $email: frappe.session.user,
- });
- }
- }
-
add_browser_class() {
$("html").addClass(frappe.utils.get_browser().name.toLowerCase());
}
diff --git a/frappe/templates/includes/app_analytics/mixpanel_analytics.html b/frappe/templates/includes/app_analytics/mixpanel_analytics.html
deleted file mode 100644
index 286593be04..0000000000
--- a/frappe/templates/includes/app_analytics/mixpanel_analytics.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{% if mixpanel_id %}
-
-{% endif %}
\ No newline at end of file
diff --git a/frappe/www/app.html b/frappe/www/app.html
index a7468cfc30..ceceaf3219 100644
--- a/frappe/www/app.html
+++ b/frappe/www/app.html
@@ -52,7 +52,6 @@
{% endfor %}
{% include "templates/includes/app_analytics/google_analytics.html" %}
- {% include "templates/includes/app_analytics/mixpanel_analytics.html" %}
{% for sound in (sounds or []) %}