diff options
Diffstat (limited to 'django/urls')
| -rw-r--r-- | django/urls/resolvers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/urls/resolvers.py b/django/urls/resolvers.py index bad5490dcb..6c681f9d8d 100644 --- a/django/urls/resolvers.py +++ b/django/urls/resolvers.py @@ -341,8 +341,8 @@ class RoutePattern(CheckURLMixin): if self._route == path: return "", (), {} # If this isn't an endpoint, the path should start with the route. - elif path.startswith(self._route): - return path.removeprefix(self._route), (), {} + elif path.startswith(route := str(self._route)): + return path.removeprefix(route), (), {} return None def check(self): |
