my_company.py: check validation before adding user

This commit is contained in:
Rushabh Mehta
2011-07-13 17:14:38 +05:30
parent af596344ba
commit 09c134408d

View File

@@ -52,12 +52,13 @@ def delete_user(args):
# #
def add_user(args): def add_user(args):
args = json.loads(args) args = json.loads(args)
add_profile(args['user'])
# erpnext-saas # erpnext-saas
if cint(webnotes.conn.get_value('Control Panel', None, 'sync_with_gateway')): if cint(webnotes.conn.get_value('Control Panel', None, 'sync_with_gateway')):
from server_tools.gateway_utils import add_user_gateway from server_tools.gateway_utils import add_user_gateway
add_user_gateway(args['user']) add_user_gateway(args['user'])
add_profile(args['user'])
# #
# add profile record # add profile record
# #