Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(django): SentryWrappingMiddleware.__init__ fails if super() is ob…
…ject As described in issue #2461, the SentryWrappingMiddleware MRO is just object if Django < 3.1 (when async middleware became a thing), but the async_capable check inside the class only looks for the async_capable attribute inside the middleware class. This PR makes that check also conditional on Django >= 3.1. Otherwise the code calls super(.....).__init__(get_response) and for Django < 3.1 this only finds object.__init__, not the wrapped middleware __init__. --- Co-authored-by: Daniel Szoke <[email protected]>
- Loading branch information