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
--- 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(
--- 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)
--- 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())