Skip to content

Commit

Permalink
Fixed last element of prefix in condition for escape error
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliypopel committed Sep 27, 2024
1 parent a267795 commit 890b9f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/django_routify/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 890b9f7

Please sign in to comment.