mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 16:22:22 +00:00
Fix extra token accesses when someone is already logged
This commit is contained in:
parent
1ef48fc3b4
commit
dd4171b0e8
@ -79,6 +79,7 @@ class ExtraAccessMiddleware(object):
|
|||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
pool = Pool.objects.filter(extra_access_token=request.GET["extra_access_token"])
|
pool = Pool.objects.filter(extra_access_token=request.GET["extra_access_token"])
|
||||||
if pool.exists():
|
if pool.exists():
|
||||||
|
pool = pool.get()
|
||||||
pool.juries.add(request.user)
|
pool.juries.add(request.user)
|
||||||
pool.save()
|
pool.save()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user