sqs = sqs.filter(code__contains=self.cleaned_data['code'])
if self.cleaned_data.get('location'):
- sqs = sqs.filter(location_principal__startswith=self.cleaned_data['location']).filter_or(location_relation__startswith=self.cleaned_data['location'])
+ sqs = sqs.filter(Q(location_principal__startswith=self.cleaned_data['location'])|Q(location_relation__startswith=self.cleaned_data['location']))
if self.cleaned_data['ethnic_group']:
if self.cleaned_data.get('ethnic_group') != '':