# HG changeset patch # User Sverre Rabbelier # Date 1223836832 0 # Node ID a2121c1143b2ee2a9ceb93d973360c096afe7826 # Parent 0386d634ad9f0b292560ff8bbf11943ad56da380 Dictionaries need String values for keys The cleanup patch earlier mistakenly used raw names as keys to the dictionary (such as one would do in a function call). This fixes that mistake. Patch by: Sverre Rabbelier Reviewed by: to-be-reviewed diff -r 0386d634ad9f -r a2121c1143b2 app/soc/views/site/home.py --- a/app/soc/views/site/home.py Sun Oct 12 18:32:43 2008 +0000 +++ b/app/soc/views/site/home.py Sun Oct 12 18:40:32 2008 +0000 @@ -158,14 +158,14 @@ user = models.user.logic.getFromFields(email=logged_in_id) properties = { - title : document_form.cleaned_data.get('title'), - short_name : document_form.cleaned_data.get('short_name'), - abstract : document_form.cleaned_data.get('abstract'), - content : document_form.cleaned_data.get('content'), - link_name : link_name, - partial_path : partial_path, - id : logged_in_id, - user : user, + 'title' : document_form.cleaned_data.get('title'), + 'short_name' : document_form.cleaned_data.get('short_name'), + 'abstract' : document_form.cleaned_data.get('abstract'), + 'content' : document_form.cleaned_data.get('content'), + 'link_name' : link_name, + 'partial_path' : partial_path, + 'id' : logged_in_id, + 'user' : user, } site_doc = document.logic.updateOrCreateFromFields( diff -r 0386d634ad9f -r a2121c1143b2 app/soc/views/site/user/profile.py --- a/app/soc/views/site/user/profile.py Sun Oct 12 18:32:43 2008 +0000 +++ b/app/soc/views/site/user/profile.py Sun Oct 12 18:40:32 2008 +0000 @@ -414,10 +414,10 @@ link_name = form.cleaned_data.get('link_name') properties = { - id : form_id, - link_name : link_name, - nick_name : form.cleaned_data.get('nick_name'), - is_developer : form.cleaned_data.get('is_developer'), + 'id' : form_id, + 'link_name' : link_name, + 'nick_name' : form.cleaned_data.get('nick_name'), + 'is_developer' : form.cleaned_data.get('is_developer'), } user = models.user.logic.updateOrCreateFromFields(properties, email=form_id) diff -r 0386d634ad9f -r a2121c1143b2 app/soc/views/user/profile.py --- a/app/soc/views/user/profile.py Sun Oct 12 18:32:43 2008 +0000 +++ b/app/soc/views/user/profile.py Sun Oct 12 18:40:32 2008 +0000 @@ -133,9 +133,9 @@ if form.is_valid(): new_link_name = form.cleaned_data.get('link_name') properties = { - link_name : new_link_name, - nick_name : form.cleaned_data.get("nick_name"), - id : id, + 'link_name' : new_link_name, + 'nick_name' : form.cleaned_data.get("nick_name"), + 'id' : id, } user = models.user.logic.updateOrCreateFromFields(properties, email=id.email())