Fix too long lines and fix the bug where undefined variable was used in _editPost method in soc.views.models.mentor module.
Patch by: Pawel Solyga
Reviewed by: to-be-reviewed
--- a/app/soc/views/models/mentor.py Wed Mar 04 21:17:40 2009 +0000
+++ b/app/soc/views/models/mentor.py Wed Mar 04 21:19:07 2009 +0000
@@ -54,7 +54,8 @@
rights = access.Checker(params)
rights['create'] = ['checkIsDeveloper']
- rights['edit'] = [('checkHasActiveRoleForScope', soc.logic.models.mentor.logic)]
+ rights['edit'] = [('checkHasActiveRoleForScope',
+ soc.logic.models.mentor.logic)]
rights['delete'] = ['checkIsDeveloper']
rights['invite'] = [('checkHasActiveRoleForScope',
soc.logic.models.org_admin.logic)]
@@ -144,7 +145,7 @@
fields['user'] = fields['link_id']
fields['link_id'] = fields['user'].link_id
- group_logic = params['group_logic']
+ group_logic = self._params['group_logic']
group_entity = group_logic.getFromKeyName(fields['scope_path'])
fields['program'] = group_entity.scope