Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix bug that basically made it impossible to register as a guest user

Roland Geider18b99f33fe06
diff --git a/wger/manager/views/user.py b/wger/manager/views/user.py
index e6795058c..8ff2ebebf 100644
--- a/wger/manager/views/user.py
+++ b/wger/manager/views/user.py
@@ -82,8 +82,8 @@ def registration(request):
if request.method == 'POST':
- # If the user is already logged in, redirect
- if request.user.is_authenticated():
+ # Redirect regular users, in case they reached the registration page
+ if request.user.is_authenticated() and not request.user.userprofile.is_temporary:
return HttpResponseRedirect(reverse('dashboard'))
form = FormClass(data=request.POST)