[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)
|
||||
|
||||
added += 1
|
||||
except Exception, e:
|
||||
# already added, ignore
|
||||
if e.args[0]!=1062:
|
||||
raise
|
||||
except frappe.UniqueValidationError:
|
||||
pass
|
||||
|
||||
frappe.msgprint(_("{0} subscribers added").format(added))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user