Skip to content

Commit

Permalink
Fix super() usage in SessionDeleteView
Browse files Browse the repository at this point in the history
The existing call to `super()` fails with a `TypeError: super() takes at least 1 argument (0 given)`. This fixes session deletion.

Additionally, the existing call doesn't return any value from `super` and returning `None` instead of a valid response object also raises an error.
  • Loading branch information
gera committed Mar 25, 2017
1 parent ece45f3 commit f2d5c56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user_sessions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def delete(self, request, *args, **kwargs):
next_page = getattr(settings, 'LOGOUT_REDIRECT_URL',
getattr(settings, 'LOGOUT_URL', '/'))
return redirect(resolve_url(next_page))
super().delete(request, *args, **kwargs)
return super(SessionDeleteView, self).delete(request, *args, **kwargs)

def get_success_url(self):
return str(reverse_lazy('user_sessions:session_list'))
Expand Down

0 comments on commit f2d5c56

Please sign in to comment.