Skip to content

Commit 662ceb8

Browse files
committed
Rename from_length to from_url_length
1 parent ed587cf commit 662ceb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

readthedocs/redirects/querysets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def get_redirect_path_with_status(self, path, full_path=None, language=None, ver
3939
output_field=CharField(),
4040
),
4141

42-
from_length=ExpressionWrapper(
42+
from_url_length=ExpressionWrapper(
4343
Length('from_url'),
4444
output_field=IntegerField(),
4545
),
@@ -48,15 +48,15 @@ def get_redirect_path_with_status(self, path, full_path=None, language=None, ver
4848
from_url_without_rest=Substr(
4949
'from_url',
5050
1,
51-
F('from_length') - 5, # Strip "$rest"
51+
F('from_url_length') - 5, # Strip "$rest"
5252
output_field=CharField(),
5353
),
5454

5555
# 1-indexed
5656
full_path_without_rest=Substr(
5757
'full_path',
5858
1,
59-
F('from_length') - 5, # Strip "$rest"
59+
F('from_url_length') - 5, # Strip "$rest"
6060
output_field=CharField(),
6161
),
6262
)

0 commit comments

Comments
 (0)