From f2807ce2ec7a2c528f3a035174b617f8cfb59a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= Date: Fri, 31 Jan 2020 11:00:11 +0100 Subject: [PATCH] misc: RemovedInDjango20Warning is_authenticated and is_anonymous (#39438) RemovedInDjango20Warning: Using user.is_authenticated() and user.is_anonymous() as a method is deprecated. Remove the parentheses to use it as an attribute. --- combo/apps/lingo/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/combo/apps/lingo/views.py b/combo/apps/lingo/views.py index 4d6f03a5..1f75ab14 100644 --- a/combo/apps/lingo/views.py +++ b/combo/apps/lingo/views.py @@ -890,7 +890,7 @@ class TransactionStatusApiView(View): except (Transaction.DoesNotExist, ValueError): return HttpResponseNotFound(_('Unknown transaction.')) - user = request.user if request.user.is_authenticated() else None + user = request.user if request.user.is_authenticated else None error_msg = _('Transaction does not belong to the requesting user') if user and transaction.user and user != transaction.user: return HttpResponseForbidden(error_msg)