Skip to content

Commit

Permalink
fix: πŸ› handling of non-ascii search terms
Browse files Browse the repository at this point in the history
  • Loading branch information
westh committed Feb 17, 2022
1 parent 59f73c9 commit 0e53f33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def main(wf):
return

search_term = query[1] if len(query) == 1 else ' '.join(query[1:])
search_term = search_term.decode('utf-8')
cards_response = get_cards(search_term, user_token)
is_denied_due_to_auth = cards_response.status_code == 401
if (is_denied_due_to_auth):
Expand All @@ -113,7 +114,7 @@ def main(wf):
is_no_card_found = len(cards) == 0
if (is_no_card_found):
wf.add_item(
title='No cards found for "' + query + '"',
title='No cards found for "' + search_term + '"',
valid=False
)
wf.send_feedback()
Expand Down

0 comments on commit 0e53f33

Please sign in to comment.