Commit c1397ef5 authored by Skia's avatar Skia 🤘
Browse files

Small fix, episode two

parent 9847186b
Pipeline #481 passed with stage
in 2 minutes and 20 seconds
......@@ -23,7 +23,7 @@ def search_user(query, as_json=False):
users = User.objects.filter(Q(first_name__icontains=query) |
nicks = nicks[:5]
users = users[:5]
users = users[:50]
if as_json: # Re-loads json to avoid double encoding by JsonResponse, but still benefit from serializers
exact_nick = json.loads(serializers.serialize('json', exact_nick, fields=('nick_name', 'last_name', 'first_name', 'profile_pict')))
nicks = json.loads(serializers.serialize('json', nicks, fields=('nick_name', 'last_name', 'first_name', 'profile_pict')))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment