[fix] newsletter list unique check
This commit is contained in:
parent
f2e5e7fc22
commit
c3e1f6bb96
@ -34,10 +34,8 @@ class NewsletterList(Document):
|
|||||||
}).insert(ignore_permissions=True)
|
}).insert(ignore_permissions=True)
|
||||||
|
|
||||||
added += 1
|
added += 1
|
||||||
except Exception, e:
|
except frappe.UniqueValidationError:
|
||||||
# already added, ignore
|
pass
|
||||||
if e.args[0]!=1062:
|
|
||||||
raise
|
|
||||||
|
|
||||||
frappe.msgprint(_("{0} subscribers added").format(added))
|
frappe.msgprint(_("{0} subscribers added").format(added))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user