Fix extra token accesses when someone is already logged

This commit is contained in:
Yohann D'ANELLO 2020-05-30 20:47:54 +02:00
parent 1ef48fc3b4
commit dd4171b0e8
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ class ExtraAccessMiddleware(object):
if request.user.is_authenticated:
pool = Pool.objects.filter(extra_access_token=request.GET["extra_access_token"])
if pool.exists():
pool = pool.get()
pool.juries.add(request.user)
pool.save()
else: