Skip to content

Commit

Permalink
Fix problem described at danfairs#66
Browse files Browse the repository at this point in the history
  • Loading branch information
agoloborodko committed Aug 9, 2020
1 parent cfe77e1 commit 1339067
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lazysignup/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.contrib.auth import get_user
from django.contrib.auth import login
from django.shortcuts import redirect
from django.utils.decorators import available_attrs
from functools import WRAPPER_ASSIGNMENTS

from lazysignup.constants import USER_AGENT_BLACKLIST
from lazysignup.utils import is_lazy_user
Expand Down Expand Up @@ -51,7 +51,7 @@ def wrapped(request, *args, **kwargs):

def require_lazy_user(*redirect_args, **redirect_kwargs):
def decorator(func):
@wraps(func, assigned=available_attrs(func))
@wraps(func, assigned=WRAPPER_ASSIGNMENTS)
def inner(request, *args, **kwargs):
if is_lazy_user(request.user):
return func(request, *args, **kwargs)
Expand All @@ -63,7 +63,7 @@ def inner(request, *args, **kwargs):

def require_nonlazy_user(*redirect_args, **redirect_kwargs):
def decorator(func):
@wraps(func, assigned=available_attrs(func))
@wraps(func, assigned=WRAPPER_ASSIGNMENTS)
def inner(request, *args, **kwargs):
if not is_lazy_user(request.user):
return func(request, *args, **kwargs)
Expand Down

0 comments on commit 1339067

Please sign in to comment.