1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 19:49:59 +00:00

Fix error on search for non-Unicode.

This commit is contained in:
ReimuHakurei 2017-05-24 10:14:03 +00:00
parent 8da628136f
commit 363203dfe0

View file

@ -183,7 +183,7 @@ def home(rss):
if search_term: if search_term:
exploded_query = search_term.split(" ") exploded_query = search_term.split(" ")
first_word_user = models.User.by_username(exploded_query[0]) first_word_user = models.User.by_username(exploded_query[0].encode('ascii', 'ignore'))
exploded_query.pop(0) exploded_query.pop(0)
query_sans_user = ' '.join(exploded_query) query_sans_user = ' '.join(exploded_query)
else: else: