When matching URL patterns, the last elem should always at least one char (#4021)
This commit is contained in:
parent
e4057a34b9
commit
e11dd49edf
1 changed files with 1 additions and 1 deletions
|
|
@ -333,7 +333,7 @@ class BaseResponse(_TemplateEnvironmentMixin, ActionAuthenticatorMixin):
|
|||
.replace("-", "_")
|
||||
)
|
||||
if is_last:
|
||||
return "(?P<%s>[^/]*)" % name
|
||||
return "(?P<%s>[^/]+)" % name
|
||||
return "(?P<%s>.*)" % name
|
||||
|
||||
elems = uri.split("/")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue