Fixes the problem of GHOP Task editing after it is created.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Sun, 27 Sep 2009 01:23:58 +0530
changeset 2978 2b3c39483f6f
parent 2977 e4b6d1f02974
child 2979 ba4aeaaad0a1
child 2980 cbfd8e12527a
Fixes the problem of GHOP Task editing after it is created.
app/soc/modules/ghop/views/models/task.py
--- a/app/soc/modules/ghop/views/models/task.py	Fri Sep 25 09:21:47 2009 +0200
+++ b/app/soc/modules/ghop/views/models/task.py	Sun Sep 27 01:23:58 2009 +0530
@@ -519,9 +519,12 @@
 
     filter = {
         'user': user_account,
-        'scope': fields['scope'],
         'status': 'active'
         }
+    if not entity:
+      filter['scope'] = fields['scope']
+    else:
+      filter['scope'] = entity.program
 
     role_entity = ghop_org_admin_logic.logic.getForFields(
         filter, unique=True)