fix: Clear duplicate entry message (#6961)
This commit is contained in:
parent
56a221573b
commit
a87b9cc3bd
1 changed files with 1 additions and 0 deletions
|
|
@ -83,6 +83,7 @@ def create(user, exists_ok = False, fields = None):
|
|||
dprof.user = user
|
||||
dprof.save(ignore_permissions = True)
|
||||
except frappe.DuplicateEntryError:
|
||||
frappe.clear_messages()
|
||||
if not exists_ok:
|
||||
frappe.throw(_('Chat Profile for User {0} exists.').format(user))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue