git://git.onelab.eu
/
myslice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a9f4f73
)
BugFix: MyAccount: Edit name is now possible if there was no entry previously
author
Yasin
<mohammed-yasin.rahman@lip6.fr>
Tue, 17 Sep 2013 13:21:48 +0000
(15:21 +0200)
committer
Yasin
<mohammed-yasin.rahman@lip6.fr>
Tue, 17 Sep 2013 13:21:48 +0000
(15:21 +0200)
portal/accountview.py
patch
|
blob
|
history
diff --git
a/portal/accountview.py
b/portal/accountview.py
index
a95a7a4
..
5f7a396
100644
(file)
--- 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)
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
# 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!')
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!')