We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc3f747 commit e26d7b8Copy full SHA for e26d7b8
sentry_sdk/integrations/django/middleware.py
@@ -91,9 +91,14 @@ def sentry_wrapped_method(*args, **kwargs):
91
92
try:
93
# fails for __call__ of function on Python 2 (see py2.7-django-1.11)
94
- return wraps(old_method)(sentry_wrapped_method) # type: ignore
+ sentry_wrapped_method = wraps(old_method)(sentry_wrapped_method)
95
+
96
+ # Necessary for Django 3.1
97
+ sentry_wrapped_method.__self__ = old_method.__self__ # type: ignore
98
except Exception:
- return sentry_wrapped_method # type: ignore
99
+ pass
100
101
+ return sentry_wrapped_method # type: ignore
102
103
return old_method
104
0 commit comments