Commit d3c434f8 authored by Michal Čihař's avatar Michal Čihař

Make backeds set instead of list

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 22b91334
......@@ -434,13 +434,11 @@ def register(request):
else:
form = form_class()
backends = list(load_backends(BACKENDS).keys())
backends = set(load_backends(BACKENDS).keys())
# Redirect if there is only one backend
if len(backends) == 1 and backends[0] != 'email':
return redirect('social:begin', backends[0])
backends = set(backends)
if len(backends) == 1 and 'email' not in backends:
return redirect('social:begin', backends.pop())
return render(
request,
......
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