From 37893c7a769e5b8ebf58cf9f43eb446b7b439879 Mon Sep 17 00:00:00 2001 From: Kwong Tung Nan Date: Fri, 5 Jul 2024 19:41:26 +0800 Subject: [PATCH] fix(tg): Case insensitive identification number for /spot Signed-off-by: Kwong Tung Nan --- telegram_provider/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram_provider/handlers.py b/telegram_provider/handlers.py index 1392e18..2caecf2 100644 --- a/telegram_provider/handlers.py +++ b/telegram_provider/handlers.py @@ -247,7 +247,7 @@ async def spot(update: Update, context) -> None: # Search for vehicle vehicle = await Vehicle.objects.filter( - Q(identification_no__startswith=args.vehicle_number, lines__in=lines) + Q(identification_no__istartswith=args.vehicle_number, lines__in=lines) & ~Q( status__in=[ VehicleStatus.MARRIED,