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

Deleting all gyms and then creating a new gym throws error. #236

Closed
ghost opened this issue Nov 8, 2015 · 1 comment
Closed

Deleting all gyms and then creating a new gym throws error. #236

ghost opened this issue Nov 8, 2015 · 1 comment
Milestone

Comments

@ghost
Copy link

ghost commented Nov 8, 2015

To reproduce:

  1. Delete all the gyms
  2. Create a new gym
  3. Try to view the gym members

NoReverseMatch at /en/gym/6/members

Reverse for 'edit' with arguments '('',)' and keyword arguments '{}' not found. 1 pattern(s) tried: ['en/gym/admin-config/(?P\d+)/edit$']

Request Method: GET
Request URL: http://127.0.0.1:8000/en/gym/6/members
Django Version: 1.8.6
Exception Type: NoReverseMatch
Exception Value:

Reverse for 'edit' with arguments '('',)' and keyword arguments '{}' not found. 1 pattern(s) tried: ['en/gym/admin-config/(?P\d+)/edit$']

rolandgeider added a commit that referenced this issue Nov 9, 2015
These tests check that the user viewing the gym's member page has a
GymAdminConfig entry and belongs to the current gym. This is necessary becasue
administrators don't necessarily belong to a gym, but are allowed to access
the member list.

Fixes #236
@rolandgeider
Copy link
Member

Good catch!

I have added a check in the template, since this constellation could also potentially happen through other ways.

@rolandgeider rolandgeider added this to the 1.7 milestone Nov 9, 2015
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

No branches or pull requests

1 participant