Fixes logged out state for user search

This commit is contained in:
Mouse Reeve 2021-07-28 16:43:49 -07:00
parent d5c36dbc28
commit 0ed0f45b32

View file

@ -82,7 +82,7 @@ def user_search(query, viewer, *_):
"""cool kids members only user search""" """cool kids members only user search"""
# logged out viewers can't search users # logged out viewers can't search users
if not viewer.is_authenticated: if not viewer.is_authenticated:
return models.User.objects.none() return models.User.objects.none(), None
# use webfinger for mastodon style account@domain.com username to load the user if # use webfinger for mastodon style account@domain.com username to load the user if
# they don't exist locally (handle_remote_webfinger will check the db) # they don't exist locally (handle_remote_webfinger will check the db)