mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +00:00
lower the number of characters to trigger a fulltext search
This commit is contained in:
parent
813bbbb94a
commit
ab72e01707
@ -54,7 +54,7 @@ class UserFilterSchema(FilterSchema):
|
||||
def filter_search(self, value: str | None) -> Q:
|
||||
if not value:
|
||||
return Q()
|
||||
if len(value) < 4:
|
||||
if len(value) < 3:
|
||||
# For small queries, full text search isn't necessary
|
||||
return (
|
||||
Q(first_name__istartswith=value)
|
||||
|
Loading…
Reference in New Issue
Block a user