mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +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:
|
def filter_search(self, value: str | None) -> Q:
|
||||||
if not value:
|
if not value:
|
||||||
return Q()
|
return Q()
|
||||||
if len(value) < 4:
|
if len(value) < 3:
|
||||||
# For small queries, full text search isn't necessary
|
# For small queries, full text search isn't necessary
|
||||||
return (
|
return (
|
||||||
Q(first_name__istartswith=value)
|
Q(first_name__istartswith=value)
|
||||||
|
Loading…
Reference in New Issue
Block a user