diff --git a/src/django_routify/router.py b/src/django_routify/router.py index b4e8f9f..ca3bd71 100644 --- a/src/django_routify/router.py +++ b/src/django_routify/router.py @@ -84,7 +84,7 @@ def register(view: FUNC_VIEW | View) -> FUNC_VIEW | View: if url_path != '': url_path += '/' - if url_path == '/' and self.__prefix[-1] == '/': + if url_path == '/' and self.__prefix[-1:] == '/': url_path = '' if self.__auto_naming and not name: