Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NoReverseMatch when project_name is empty #7773

Merged
merged 7 commits into from
Oct 28, 2020

Conversation

amustapha
Copy link
Contributor

Description

Currently, when a project name is empty the reverse url method raises a NoReverseMatch error. This can prevent customers from temporarily being able to access the system. A quickfix could be to modify defaulting instances but a more longterm solution would be to allow null project_name. This is done by

  1. Creating a new url path that doesn't accept project_name
  2. Check if a project has a name, if it doesn't do not include empty string in the kwargs
Refers/Fixes
Testing

Copy link
Contributor

@danlipert danlipert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just one little typo, but looks great

@codecov
Copy link

codecov bot commented Oct 27, 2020

Codecov Report

Merging #7773 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7773   +/-   ##
=======================================
  Coverage   25.42%   25.42%           
=======================================
  Files         328      328           
  Lines       33044    33044           
  Branches     4918     4919    +1     
=======================================
  Hits         8401     8401           
+ Misses      24356    24351    -5     
- Partials      287      292    +5     
Impacted Files Coverage Δ
app/app/urls.py 86.20% <ø> (ø)
app/dashboard/views.py 10.35% <100.00%> (ø)
app/marketing/mails.py 11.88% <0.00%> (-0.03%) ⬇️
app/quests/views.py 16.22% <0.00%> (ø)
app/retail/emails.py 20.43% <0.00%> (ø)
...rketing/management/commands/no_applicants_email.py 0.00% <0.00%> (ø)
...eting/management/commands/assemble_leaderboards.py 39.73% <0.00%> (ø)
app/dashboard/models.py 50.01% <0.00%> (+0.04%) ⬆️

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 3f4fd04...f417f1a. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants