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

Reverse for 'policy_policyrules' not found. #39

Closed
progala opened this issue May 31, 2022 · 0 comments · Fixed by #40
Closed

Reverse for 'policy_policyrules' not found. #39

progala opened this issue May 31, 2022 · 0 comments · Fixed by #40
Assignees

Comments

@progala
Copy link
Contributor

progala commented May 31, 2022

Environment

  • Python version: 3.8.13
  • Nautobot version: v1.3.1
  • nautobot-plugin-firewall-model version: latest main branch

Expected Behavior

Successful redirect after updating policy rule index in the "Edit Policy Rule Indexes", in the detailed policy view.

Observed Behavior

Policy rule index is updated but exception is raised after clicking "Submit".

NoReverseMatch at /plugins/firewall/policy/72861d28-8b72-43c3-b487-ddcd37d123bb/

Reverse for 'policy_policyrules' not found. 'policy_policyrules' is not a valid view function or pattern name.

Request Method: 	POST
Request URL: 	http://172.28.136.211:8080/plugins/firewall/policy/72861d28-8b72-43c3-b487-ddcd37d123bb/?tab=edit-policy-rule-index
Django Version: 	3.2.13
Exception Type: 	NoReverseMatch
Exception Value: 	

Reverse for 'policy_policyrules' not found. 'policy_policyrules' is not a valid view function or pattern name.

Exception Location: 	/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py, line 698, in _reverse_with_prefix
Python Executable: 	/usr/local/bin/python
Python Version: 	3.8.13
Python Path: 	

['/source',
 '/usr/local/lib/python3.8/site-packages/git/ext/gitdb',
 '/source',
 '/usr/local/bin',
 '/usr/local/lib/python38.zip',
 '/usr/local/lib/python3.8',
 '/usr/local/lib/python3.8/lib-dynload',
 '/root/.local/lib/python3.8/site-packages',
 '/usr/local/lib/python3.8/site-packages',
 '/source',
 '/usr/local/lib/python3.8/site-packages/gitdb/ext/smmap']

Steps to Reproduce

  1. Create a policy with single rule
  2. Navigate to policy details
  3. Change to "Edit Policy Rule Indexes" tab
  4. Change rule index value and click "Submit"
@progala progala self-assigned this May 31, 2022
whitej6 added a commit that referenced this issue Jun 8, 2022
…e-fix

Fix reverse URL in  PolicyView redirect - issue #39
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 a pull request may close this issue.

1 participant