Identity is not the same thing as equality in Python

[flake8](http://flake8.pycqa.org) F632 Use ==/!= to compare str, bytes, and int literals

$ __python__
```python
>>> 0 == 0.0
True
>>> 0 is 0.0
False
```
sh_branch
cclauss 7 years ago committed by GitHub
parent 4d443b3b04
commit eb0f793895
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