Commit 7b02c567 authored by Sergios Aftsidis's avatar Sergios Aftsidis

Fix user accounts assigned with wrong peers

parent 085dec60
......@@ -85,10 +85,19 @@ def activate(request, activation_key):
if request.method == "POST":
request_data = request.POST.copy()
user = User.objects.get(pk=request_data['user'])
up = user.get_profile()
for peer in request_data['peers']:
# use getlist to get the list of peers (might be multiple)
profile_peers = request.POST.getlist('peers')
# remove already assigned peers, as these are selected by
# the user, no admin has yet verified those. They will be
# replaced by the admin's selection.
for peer in profile_peers:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment