diff options
author | nishanth | 2010-02-05 16:35:32 +0530 |
---|---|---|
committer | nishanth | 2010-02-05 16:35:32 +0530 |
commit | f4c222eb65df97423af4b6fa5216c2d0cfe2f0f4 (patch) | |
tree | a6572949afedd42e6d9d738d5721fa64c4d6e1db | |
parent | d3e9b0e20c7ab78a4d31fca706459ea72c4ea0ec (diff) | |
download | pytask-f4c222eb65df97423af4b6fa5216c2d0cfe2f0f4.tar.gz pytask-f4c222eb65df97423af4b6fa5216c2d0cfe2f0f4.tar.bz2 pytask-f4c222eb65df97423af4b6fa5216c2d0cfe2f0f4.zip |
fixed a bug in views/task/add_mentor method .
-rw-r--r-- | taskapp/views/task.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/taskapp/views/task.py b/taskapp/views/task.py index c266f22..cdb7d45 100644 --- a/taskapp/views/task.py +++ b/taskapp/views/task.py @@ -123,7 +123,12 @@ def add_mentor(request, tid): 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": |