Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ggsimp committed Mar 5, 2020
1 parent 1c900a1 commit 700f9b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
eclipse.preferences.version=1
encoding//wger/core/views/misc.py=utf-8
encoding//wger/core/views/user.py=utf-8
encoding//wger/emails/__init__.py=utf-8
encoding//wger/emails/apps.py=utf-8
encoding//wger/emails/management/commands/send-mass-emails.py=utf-8
encoding//wger/emails/models.py=utf-8
encoding//wger/emails/urls.py=utf-8
encoding//wger/emails/views/gym.py=utf-8
encoding//wger/settings_global.py=utf-8
encoding//wger/software/views.py=utf-8
encoding/settings.py=utf-8
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ django-bower
django-formtools
django-recaptcha==1.0.6
django-sortedm2m
django==2.2.8
django==2.2.10
django_compressor
django_mobile
easy-thumbnails
Expand All @@ -29,3 +29,4 @@ djangorestframework

# Python3 compatibility
six
django_user_agents
2 changes: 1 addition & 1 deletion wger/core/views/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def demo_entries(request):
if not settings.WGER_SETTINGS['ALLOW_GUEST_USERS']:
return HttpResponseRedirect(reverse('software:features'))

if (((not request.user.is_authenticated() or request.user.userprofile.is_temporary)
if (((not request.user.is_authenticated or request.user.userprofile.is_temporary)
and not request.session['has_demo_data'])):
# If we reach this from a page that has no user created by the
# middleware, do that now
Expand Down
2 changes: 1 addition & 1 deletion wger/core/views/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def registration(request):
FormClass = RegistrationFormNoCaptcha

# Redirect regular users, in case they reached the registration page
if request.user.is_authenticated() and not request.user.userprofile.is_temporary:
if request.user.is_authenticated and not request.user.userprofile.is_temporary:
return HttpResponseRedirect(reverse('core:dashboard'))

if request.method == 'POST':
Expand Down

0 comments on commit 700f9b4

Please sign in to comment.