Projet

Général

Profil

0003-misc-is_anonymous-is-yet-an-attibute-36608.patch

Lauréline Guérin, 02 octobre 2019 14:49

Télécharger (1 ko)

Voir les différences:

Subject: [PATCH 3/4] misc: is_anonymous is yet an attibute (#36608)

RemovedInDjango20Warning: Using user.is_authenticated() and user.is_anonymous() as a method is deprecated.
Remove the parentheses to use it as an attribute.
 passerelle/urls_utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
passerelle/urls_utils.py
119 119
    def check_manager(user):
120 120
        if user and user.is_staff:
121 121
            return True
122
        if user and not user.is_anonymous():
122
        if user and not user.is_anonymous:
123 123
            raise PermissionDenied()
124 124
        # As the last resort, show the login form
125 125
        return False
126
-