File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1+ import django
2+
3+
4+ if django .VERSION >= (2 ,):
5+ def user_is_authenticated (user ):
6+ return user .is_authenticated
7+ else :
8+ def user_is_authenticated (user ):
9+ return user .is_authenticated ()
Original file line number Diff line number Diff line change 22
33# project
44from .conf import settings
5+ from .compat import user_is_authenticated
56
67from ...ext import http
78from ...contrib import func_name
@@ -134,7 +135,7 @@ def _set_auth_tags(span, request):
134135 return span
135136
136137 if hasattr (user , 'is_authenticated' ):
137- span .set_tag ('django.user.is_authenticated' , user . is_authenticated ( ))
138+ span .set_tag ('django.user.is_authenticated' , user_is_authenticated ( user ))
138139
139140 uid = getattr (user , 'pk' , None )
140141 if uid :
You can’t perform that action at this time.
0 commit comments