Merge pull request #8405 from hrwX/not_fix

fix(Role): Don't return admin and guest placeholder email
This commit is contained in:
mergify[bot] 2019-09-18 07:47:49 +00:00 committed by GitHub
commit 3ba54ae3a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -31,7 +31,7 @@ def get_emails_from_role(role):
for user in users:
user_email, enabled = frappe.db.get_value("User", user.parent, ["email", "enabled"])
if enabled:
if enabled and user_email not in ["admin@example.com", "guest@example.com"]:
emails.append(user_email)
return emails

View file

@ -309,9 +309,7 @@ def evaluate_alert(doc, alert, event):
else:
raise
db_value = parse_val(db_value)
if (doc.get(alert.value_changed) == db_value) or \
(not db_value and not doc.get(alert.value_changed)):
if (doc.get(alert.value_changed) == db_value) or (not db_value and not doc.get(alert.value_changed)):
return # value not changed
if event != "Value Change" and not doc.is_new():