Skip to content

Commit

Permalink
redirect only if user already had accept the terms - #21
Browse files Browse the repository at this point in the history
  • Loading branch information
moacirmoda committed Oct 13, 2016
1 parent 0a7b5df commit bc25440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class AcceptTermsView(FormView):
success_url = reverse_lazy('courses')

def dispatch(self, request, *args, **kwargs):
if request.user.is_authenticated():
if request.user.is_authenticated() and request.user.accepted_terms:
return redirect(reverse_lazy('home_view'))
return super(AcceptTermsView, self).dispatch(request, *args, **kwargs)

Expand Down

0 comments on commit bc25440

Please # to comment.