messages.py use begin/commit for messages
This commit is contained in:
parent
1af093f6b0
commit
4f8dfd69f9
@ -25,10 +25,12 @@ def get_list(arg=None):
|
|||||||
webnotes.form_dict['user'] = webnotes.session['user']
|
webnotes.form_dict['user'] = webnotes.session['user']
|
||||||
|
|
||||||
# set all messages as read
|
# set all messages as read
|
||||||
|
webnotes.conn.begin()
|
||||||
webnotes.conn.sql("""UPDATE `tabComment`
|
webnotes.conn.sql("""UPDATE `tabComment`
|
||||||
set docstatus = 1 where comment_doctype in ('My Company', 'Message')
|
set docstatus = 1 where comment_doctype in ('My Company', 'Message')
|
||||||
and comment_docname = %s
|
and comment_docname = %s
|
||||||
""", webnotes.user.name)
|
""", webnotes.user.name)
|
||||||
|
webnotes.conn.commit()
|
||||||
|
|
||||||
if webnotes.form_dict['contact'] == webnotes.session['user']:
|
if webnotes.form_dict['contact'] == webnotes.session['user']:
|
||||||
# return messages
|
# return messages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user