diff options
-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": |