# HG changeset patch # User Sverre Rabbelier # Date 1228573490 0 # Node ID 48983ecf46652053d089a3f111b8a2b396cffd97 # Parent 7f047b2a2d3a53e79c44657a768e49324d71c733 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 diff -r 7f047b2a2d3a -r 48983ecf4665 app/soc/views/models/group.py --- 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) diff -r 7f047b2a2d3a -r 48983ecf4665 app/soc/views/models/program.py --- 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)