company whitelist fix
diff --git a/erpnext/home/page/event_updates/event_updates.py b/erpnext/home/page/event_updates/event_updates.py
index cb27043..6966b87 100644
--- a/erpnext/home/page/event_updates/event_updates.py
+++ b/erpnext/home/page/event_updates/event_updates.py
@@ -2,7 +2,7 @@
from webnotes.utils import cint
@webnotes.whitelist()
-def get_online_users():
+def get_online_users(arg=None):
# get users
return webnotes.conn.sql("""SELECT DISTINCT t1.user, t2.first_name, t2.last_name
from tabSessions t1, tabProfile t2
@@ -10,8 +10,7 @@
and t1.user not in ('Guest','Administrator')
and TIMESTAMPDIFF(HOUR,t1.lastupdate,NOW()) <= 1""", as_list=1) or []
-@webnotes.whitelist()
-def get_unread_messages():
+def get_unread_messages(arg=None):
"returns unread (docstatus-0 messages for a user)"
return cint(webnotes.conn.sql("""SELECT COUNT(*) FROM `tabComment Widget Record`
WHERE comment_doctype='My Company'
@@ -41,8 +40,7 @@
}
return ret
-@webnotes.whitelist()
-def get_setup_status():
+def get_setup_status(arg=None):
"""
Returns the setup status of the current account
"""
diff --git a/erpnext/home/page/my_company/my_company.py b/erpnext/home/page/my_company/my_company.py
index 8070c9d..c5b44fd 100644
--- a/erpnext/home/page/my_company/my_company.py
+++ b/erpnext/home/page/my_company/my_company.py
@@ -104,6 +104,7 @@
#
# post comment
#
+@webnotes.whitelist()
def post_comment(arg):
arg = load_json(arg)
@@ -146,6 +147,7 @@
#
# update read messages
#
+@webnotes.whitelist()
def set_read_all_messages(arg=''):
webnotes.conn.sql("""UPDATE `tabComment Widget Record`
SET docstatus = 1
@@ -153,6 +155,7 @@
AND comment_docname = %s
""", webnotes.user.name)
+@webnotes.whitelist()
def update_security(args=''):
import json
args = json.loads(args)