Once a task has been approved it can no longer be unapproved.
Patch by: Madhusudan C.S. and Lennard de Rijk
--- a/app/soc/modules/ghop/views/models/task.py Sun Oct 25 11:59:05 2009 +0100
+++ b/app/soc/modules/ghop/views/models/task.py Sun Oct 25 11:24:46 2009 -0700
@@ -490,6 +490,7 @@
"""See base._editPost().
"""
+ # set the scope field
super(View, self)._editPost(request, entity, fields)
# TODO: this method can be made more clear, it seems a bit of a mess
@@ -516,11 +517,9 @@
if role_entity:
# this user can publish/approve the task
- if fields.get('approved') and fields.get('published'):
+ if fields.get('published'):
fields['status'] = 'Open'
- elif not fields.get('approved'):
- fields['status'] = 'Unapproved'
- else:
+ elif fields.get('approved'):
fields['status'] = 'Unpublished'
fields['mentors'] = []