improve transport & hosting booking filters

This commit is contained in:
Élie Bouttier 2016-10-03 14:13:55 +02:00
parent a8873def54
commit 0132f84456
1 changed files with 2 additions and 2 deletions

View File

@ -337,10 +337,10 @@ def speaker_list(request):
speakers = speakers.filter(sound=data['sound'])
if data['transport_booked'] != None:
show_filters = True
speakers = speakers.filter(transport_booked=data['transport_booked'])
speakers = speakers.filter(need_transport=True).filter(transport_booked=data['transport_booked'])
if data['hosting_booked'] != None:
show_filters = True
speakers = speakers.filter(hosting_booked=data['hosting_booked'])
speakers = speakers.filter(need_hosting=True).filter(hosting_booked=data['hosting_booked'])
return render(request, 'proposals/speaker_list.html', {
'speaker_list': speakers,
'filter_form': filter_form,