Skip to content

crash fix when using a custom dmp_path regex #42

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wynnw
Copy link

@wynnw wynnw commented Nov 12, 2019

  • This prevents a crash if the dmp_path regex captures a None value for
    the dmp_urlparams matching group. A regex like:

^(org.(?P[_a-zA-Z0-9-]+)/)?(?P<dmp_page>[_a-zA-Z0-9-]+)(.?P<dmp_function>[_a-zA-Z0-9.-]+)?/(?P<dmp_urlparams>.+?)?$

for a path like:
org.agency-1/agent_dashboard/

would result in the crash.

Wynn Wilkes added 2 commits November 12, 2019 10:21
- This prevents a crash if the dmp_path regex captures a None value for
the dmp_urlparams matching group. A regex like:

^(org\.(?P<orgslug>[_a-zA-Z0-9\-]+)/)?(?P<dmp_page>[_a-zA-Z0-9\-]+)(\.?P<dmp_function>[_a-zA-Z0-9\.\-]+)?/(?P<dmp_urlparams>.+?)?$

for a path like:
org.agency-1/agent_dashboard/

would result in the crash.
- This avoids silent errors when a view has a syntax error or other
failure that causes it to not import.
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.

1 participant