From c608b4ff51e867022e93eae2a17e83a4f85e62ac Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 17 Sep 2013 15:21:48 +0200 Subject: [PATCH] BugFix: MyAccount: Edit name is now possible if there was no entry previously --- portal/accountview.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/portal/accountview.py b/portal/accountview.py index a95a7a45..5f7a3960 100644 --- a/portal/accountview.py +++ b/portal/accountview.py @@ -105,9 +105,12 @@ def account_process(request): config['lastname'] = edited_last_name config['authority'] = config.get('authority','Unknown Authority') updated_config = json.dumps(config) - + user_params = {'config': updated_config} + else: # it's needed if the config is empty + user_config['config']= '{"firstname":"' + edited_first_name + '", "lastname":"'+ edited_last_name + '", "authority": "Unknown Authority"}' + user_params = {'config': user_config['config']} # updating config local:user in manifold - user_params = { 'config': updated_config} + #user_params = { 'config': updated_config} manifold_update_user(request,user_params) # this will be depricated, we will show the success msg in same page return HttpResponse('Sucess: First Name and Last Name Updated!') -- 2.43.0