fixed a bug in views/task/add_mentor method .
authornishanth
Fri, 05 Feb 2010 16:35:32 +0530
changeset 34 22f302094806
parent 33 0d0ea7b188d5
child 35 da5fe6708528
fixed a bug in views/task/add_mentor method .
taskapp/views/task.py
--- a/taskapp/views/task.py	Fri Feb 05 16:05:54 2010 +0530
+++ b/taskapp/views/task.py	Fri Feb 05 16:35:32 2010 +0530
@@ -123,7 +123,12 @@
         user_list = list(User.objects.all())
         for mentor in task.mentors.all():
             user_list.remove(mentor)
+            
+        for a_user in task.claimed_users.all():
+            user_list.remove(a_user)
+            
         non_mentors = ((_.id,_.username) for _ in user_list)
+        ## code till must be made elegant and not brute force like above
         
         form = AddMentorForm(non_mentors)
         if request.method == "POST":