From 890b9f727216bb875601a832cd6af0cc35d43bd2 Mon Sep 17 00:00:00 2001 From: vitaliypopel Date: Fri, 27 Sep 2024 14:23:22 +0300 Subject: [PATCH] Fixed last element of prefix in condition for escape error --- src/django_routify/router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: