Merge pull request #288 from cclauss/patch-1

Identity is not the same thing as equality in Python
pull/12/head
且听风吟 7 years ago committed by GitHub
commit da741da457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -624,7 +624,7 @@ class WhooshSearchBackend(BaseSearchBackend):
if string_key in index.fields and hasattr(index.fields[string_key], 'convert'):
# Special-cased due to the nature of KEYWORD fields.
if index.fields[string_key].is_multivalued:
if value is None or len(value) is 0:
if value is None or len(value) == 0:
additional_fields[string_key] = []
else:
additional_fields[string_key] = value.split(',')

Loading…
Cancel
Save