mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 05:02:23 +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:
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user