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.
This commit is contained in:
parent
d217767257
commit
f2807ce2ec
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue