todo: do not send message to if assigned to self
This commit is contained in:
parent
f480dc9d2e
commit
38cc3d6534
@ -48,7 +48,7 @@ def edit(arg=None):
|
|||||||
def delete(arg=None):
|
def delete(arg=None):
|
||||||
name = webnotes.form_dict['name']
|
name = webnotes.form_dict['name']
|
||||||
d = Document('ToDo', name)
|
d = Document('ToDo', name)
|
||||||
if d and d.name:
|
if d and d.name and d.owner != webnotes.session['user']:
|
||||||
notify_assignment(d)
|
notify_assignment(d)
|
||||||
webnotes.conn.sql("delete from `tabToDo` where name = %s", name)
|
webnotes.conn.sql("delete from `tabToDo` where name = %s", name)
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ def notify_assignment(d):
|
|||||||
doc_name = d.reference_name
|
doc_name = d.reference_name
|
||||||
assigned_by = d.assigned_by
|
assigned_by = d.assigned_by
|
||||||
|
|
||||||
if doc_type and doc_name and assigned_by:
|
if doc_type and doc_name and assigned_by and assigned_by != d.owner:
|
||||||
from webnotes.widgets.form import assign_to
|
from webnotes.widgets.form import assign_to
|
||||||
assign_to.notify_assignment(assigned_by, d.owner, doc_type, doc_name)
|
assign_to.notify_assignment(assigned_by, d.owner, doc_type, doc_name)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user