[hotfix] daily_emails limit fixes (#3942)

This commit is contained in:
Makarand Bauskar 2017-08-17 10:59:26 +05:30 committed by GitHub
parent a6dbec7d6d
commit 7bf6c19a31
3 changed files with 3 additions and 3 deletions

View file

@ -460,7 +460,7 @@ def _set_limits(context, site, limits):
elif limit=='space':
value = float(value)
elif limit in ('users', 'emails', 'email_group'):
elif limit in ('users', 'emails', 'email_group', 'daily_emails'):
value = int(value)
new_limits[limit] = value

View file

@ -218,7 +218,7 @@ def check_email_limit(recipients):
or frappe.flags.in_test):
monthly_email_limit = frappe.conf.get('limits', {}).get('emails')
daily_email_limit = frappe.conf.get('limits', {}).get('daily_emails')
daily_email_limit = cint(frappe.conf.get('limits', {}).get('daily_emails'))
if frappe.flags.in_test:
monthly_email_limit = 500

View file

@ -7,7 +7,7 @@ def execute():
default_email_account = get_default_outgoing_email_account()
if frappe.conf.get("google_analytics_id") == "UA-8911157-19" or \
default_email_account.email_id == "notifications@erpnext.com":
(default_email_account and default_email_account.email_id == "notifications@erpnext.com"):
frappe.db.sql("""update `tabEmail Queue` set status='Not Sent' where
creation>=DATE_SUB(NOW(), INTERVAL 16 HOUR)""")