pinax / pinax-referrals

a referrals app for Django
MIT License
216 stars 74 forks source link

fix AttributeError when request is WSGIRequest #69

Closed PetrDlouhy closed 1 year ago

PetrDlouhy commented 2 years ago

When I run my app through WSGIRequest, I sometimes got AttributeError on getting request.user. This fixes that problem.

codecov[bot] commented 1 year ago

Codecov Report

Base: 61.98% // Head: 64.04% // Increases project coverage by +2.06% :tada:

Coverage data is based on head (d8dff39) compared to base (9bfc11b). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #69 +/- ## ========================================== + Coverage 61.98% 64.04% +2.06% ========================================== Files 11 11 Lines 242 242 Branches 23 23 ========================================== + Hits 150 155 +5 + Misses 80 76 -4 + Partials 12 11 -1 ``` | [Impacted Files](https://codecov.io/gh/pinax/pinax-referrals/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pinax) | Coverage Δ | | |---|---|---| | [pinax/referrals/models.py](https://codecov.io/gh/pinax/pinax-referrals/pull/69/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pinax#diff-cGluYXgvcmVmZXJyYWxzL21vZGVscy5weQ==) | `67.01% <100.00%> (+5.15%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pinax). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pinax)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.