Spaces:
Sleeping

codeBOKER commited on
Commit
64075d7
·
1 Parent(s): 73d7170

Fix trip seat filtering and enable null seats display

Browse files

- Fix search_active_trips to properly handle null seats, using 'available_seats.gte.{seats},available_seats.is.null' instead of malformed 'available_seats.is.null,available_seats.gte.{seats}'
- Update list_active_trips to use 'available_seats.is.null,available_seats.gt.0' instead of 'gt(0)'
- Allow null seats in search results (trips without seat info)
- Make seats fields nullable in database (new migration added)
- Update trip_selection to display 'المقاعد: غير متوفرة' when seats are null
- Update test fixtures and handlers to properly handle null seats

This fixes the issue where trips with null seats were showing as '1 of 1' instead of 'المقاعد: غير متوفرة'

10 files changed +223 -34
Files changed (10)
app/database/supabase.py+14-12
app/services/group_message_service.py+4-4
app/services/trip_indexing.py+3-1
app/tools/handlers.py+6-9
app/whatsapp/trip_selection.py+8-3
supabase/migrations/202607210001_nullable_seats.sqlAdded+141
tests/conftest.py+4-4
tests/test_group_message_service.py+24
tests/test_tools.py+1-1
tests/test_trip_selection.py+18