From 3510c87e4d4a9b3e29bc3219d8f4eaede5039fa2 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Wed, 6 Nov 2019 11:19:55 +0100 Subject: [PATCH] Make destination filter really case insensitive Closes #1 --- bot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bot.py b/bot.py index af6972a..c271dc3 100644 --- a/bot.py +++ b/bot.py @@ -121,8 +121,7 @@ def get_vvs_departures(query): reply.append("Next departures for station: " + request.json()[0]['stopName']) printed_departures = 0 for station in request.json(): - if station['direction'].casefold().find(query.destination) != -1 or station['direction'].find( - query.destination) != -1: + if station['direction'].casefold().find(query.destination.casefold()) != -1 : if query.line == '' or (query.line != -1 and station['number'] == query.line): reply.append( "Line " + station['number'] + " to \"" + station['direction'] + "\" at "