arachnys / cabot

Self-hosted, easily-deployable monitoring and alerts service - like a lightweight PagerDuty
MIT License
5.59k stars 593 forks source link

Fix 404 page for anonymous user #625

Closed hartwork closed 6 years ago

hartwork commented 6 years ago

Meant to fix #624.

The anonymous user has ID None. Previously, this exception was raised:

NoReverseMatch: Reverse for 'user-profile' with arguments '(None,)' not found. 1 pattern(s) tried: ['user/(?P<pk>\\d+)/profile/$']
codecov[bot] commented 6 years ago

Codecov Report

Merging #625 into master will increase coverage by 0.05%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #625      +/-   ##
==========================================
+ Coverage   80.98%   81.03%   +0.05%     
==========================================
  Files          45       46       +1     
  Lines        2918     2927       +9     
  Branches      177      177              
==========================================
+ Hits         2363     2372       +9     
  Misses        497      497              
  Partials       58       58
Impacted Files Coverage Δ
cabot/templates/base.html 94.87% <100%> (+0.27%) :arrow_up:
cabot/templates/404.html 100% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2c8bb9d...fd66a86. Read the comment docs.

frankh commented 6 years ago

Thanks 👍