From f49ea526fb74197a91c8a5f49fe237b6ba768ef1 Mon Sep 17 00:00:00 2001 From: iliana weller Date: Sun, 24 Jun 2018 20:52:48 -0700 Subject: [PATCH] Default to visible if visible_in_picker missing --- emojos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emojos.py b/emojos.py index e306ed0..6a953e2 100644 --- a/emojos.py +++ b/emojos.py @@ -28,7 +28,7 @@ def emojo(domain): try: url = urllib.parse.urlunsplit( ('https', domain, '/api/v1/custom_emojis', '', '')) - emojo = sorted(filter(lambda x: x['visible_in_picker'], + emojo = sorted(filter(lambda x: x.get('visible_in_picker', True), requests.get(url).json()), key=operator.itemgetter('shortcode')) return render_template('emojo.html', domain=domain, emojo=emojo)