Skip to content

Commit

Permalink
Fix a 3.0 compat issue
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Apr 29, 2020
1 parent a6a4da9 commit 3157151
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions account/decorators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import functools

from django.contrib.auth import REDIRECT_FIELD_NAME
from django.utils.decorators import available_attrs

from account.utils import handle_redirect_to_login

Expand All @@ -12,7 +11,7 @@ def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url
to the log in page if necessary.
"""
def decorator(view_func):
@functools.wraps(view_func, assigned=available_attrs(view_func))
@functools.wraps(view_func, assigned=functools.WRAPPER_ASSIGNMENTS)
def _wrapped_view(request, *args, **kwargs):
if request.user.is_authenticated:
return view_func(request, *args, **kwargs)
Expand Down

0 comments on commit 3157151

Please sign in to comment.