Skip to content

Commit 37dcd55

Browse files
franciscouzorpkilby
authored andcommitted
Fix bug in escape_curly_brackets (#6909)
1 parent b4db2df commit 37dcd55

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

rest_framework/routers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ def escape_curly_brackets(url_path):
3838
"""
3939
Double brackets in regex of url_path for escape string formatting
4040
"""
41-
if ('{' and '}') in url_path:
42-
url_path = url_path.replace('{', '{{').replace('}', '}}')
43-
return url_path
41+
return url_path.replace('{', '{{').replace('}', '}}')
4442

4543

4644
def flatten(list_of_lists):

0 commit comments

Comments
 (0)