return ["*%s" % escape_ldap_filter(value)]
elif lookup_type == 'startswith':
return ["%s*" % escape_ldap_filter(value)]
- elif lookup_type == 'contains':
+ elif lookup_type in ['contains', 'icontains']:
return ["*%s*" % escape_ldap_filter(value)]
elif lookup_type == 'exact':
return [escape_ldap_filter(value)]
return "*%s" % escape_ldap_filter(value)
elif lookup_type == 'startswith':
return "%s*" % escape_ldap_filter(value)
- elif lookup_type == 'contains':
+ elif lookup_type in ['contains', 'icontains']:
return "*%s*" % escape_ldap_filter(value)
elif lookup_type == 'exact':
return escape_ldap_filter(value)