Cleanups in group and program
The missing super call in group prevented the scope from being set
as it should be.
Patch by: Sverre Rabbelier
--- a/app/soc/views/models/group.py Sat Dec 06 14:24:26 2008 +0000
+++ b/app/soc/views/models/group.py Sat Dec 06 14:24:50 2008 +0000
@@ -71,6 +71,7 @@
# fill in the founded_by with data from the entity
form.fields['founded_by'].initial = entity.founder.name
+ super(View, self)._editGet(request, entity, form)
def _editPost(self, request, entity, fields):
"""See base.View._editPost().
@@ -81,3 +82,5 @@
account = users.get_current_user()
user = user_logic.logic.getForFields({'account': account}, unique=True)
fields['founder'] = user
+
+ super(View, self)._editPost(request, entity, fields)
--- a/app/soc/views/models/program.py Sat Dec 06 14:24:26 2008 +0000
+++ b/app/soc/views/models/program.py Sat Dec 06 14:24:50 2008 +0000
@@ -54,6 +54,7 @@
new_params['logic'] = soc.logic.models.program.logic
new_params['scope_view'] = sponsor_view
+ new_params['scope_redirect'] = redirects.getCreateRedirect
new_params['name'] = "Program"
new_params['name_short'] = "Program"
@@ -69,8 +70,6 @@
'clean_link_id': cleaning.clean_link_id,
}
- new_params['scope_redirect'] = redirects.getCreateRedirect
-
params = dicts.merge(params, new_params)
super(View, self).__init__(params=params)