From dd4171b0e8dfd84dd743046bb5cfb621e87eb8f8 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 30 May 2020 20:47:54 +0200 Subject: [PATCH] Fix extra token accesses when someone is already logged --- tfjm/middlewares.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tfjm/middlewares.py b/tfjm/middlewares.py index b20051c..c5b8987 100644 --- a/tfjm/middlewares.py +++ b/tfjm/middlewares.py @@ -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: