Make user handle search to be case insensitive (#474)

This commit is contained in:
Humberto Rocha 2023-01-25 21:17:52 -05:00 committed by GitHub
parent 425c77e085
commit 5dd2ebee29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ class SearchService:
else:
for identity in Identity.objects.filter(username=handle)[:20]:
results.add(identity)
for identity in Identity.objects.filter(username__startswith=handle)[:20]:
for identity in Identity.objects.filter(username__istartswith=handle)[:20]:
results.add(identity)
return results