mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
messages.py use begin/commit for messages
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user