0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Remove redundant if statement in normalise_query_string (#9884)

This commit is contained in:
Glib 2023-01-13 06:03:55 -05:00 committed by GitHub
parent 004faac53c
commit 9316633987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,8 +71,7 @@ MAX_QUERY_STRING_LENGTH = 255
def normalise_query_string(query_string):
# Truncate query string
if len(query_string) > MAX_QUERY_STRING_LENGTH:
query_string = query_string[:MAX_QUERY_STRING_LENGTH]
query_string = query_string[:MAX_QUERY_STRING_LENGTH]
# Convert query_string to lowercase
query_string = query_string.lower()