Fix user_self calling editGet with a wrong parameter
Also fix wrong call to collectCleanedFields and stray seed
argument in user_self.
Patch by: Sverre Rabbelier, Lennard de Rijk
--- a/app/soc/views/models/base.py Sat Apr 18 12:37:12 2009 +0000
+++ b/app/soc/views/models/base.py Sat Apr 18 12:49:37 2009 +0000
@@ -437,7 +437,7 @@
if not form.is_valid():
return self._constructResponse(request, entity, context, form, params)
- fields = forms.collectCleanedFields(form)
+ _, fields = forms.collectCleanedFields(form)
self._editPost(request, entity, fields)
--- a/app/soc/views/models/user_self.py Sat Apr 18 12:37:12 2009 +0000
+++ b/app/soc/views/models/user_self.py Sat Apr 18 12:49:37 2009 +0000
@@ -138,7 +138,7 @@
@decorators.merge_params
@decorators.check_access
def editProfile(self, request, access_type,
- page_name=None, params=None, seed=None, **kwargs):
+ page_name=None, params=None, **kwargs):
"""Displays User profile edit page for the current user.
Args:
@@ -153,9 +153,9 @@
link_id = user_entity.link_id
return self.edit(request, access_type, page_name=page_name,
- params=params, seed=seed, link_id=link_id, **kwargs)
+ params=params, link_id=link_id, **kwargs)
- def editGet(self, request, entity, context, seed, params=None):
+ def editGet(self, request, entity, context, params=None):
"""Overwrite so we can add the contents of the ToS.
For params see base.View.editGet().
"""
@@ -165,8 +165,7 @@
if site_tos:
context['tos_contents'] = site_tos.content
- return super(View, self).editGet(request, entity, context,
- seed, params=params)
+ return super(View, self).editGet(request, entity, context, params=params)
def _editGet(self, request, entity, form):
"""Sets the content of the agreed_to_tos_on field and replaces.