py3 filter->list(filter

This commit is contained in:
j 2017-02-16 14:24:51 +01:00
commit 12f3901c9a
17 changed files with 48 additions and 48 deletions

View file

@ -729,7 +729,7 @@ def lookup(request, data):
i = None
if 'id' in data:
i = models.Item.objects.get(public_id=data['id'])
elif not filter(None, [d not in ('title', 'year', 'director') for d in data.keys()]):
elif not list(filter(None, [d not in ('title', 'year', 'director') for d in data.keys()])):
qs = models.Item.objects.find({'query': {
'conditions': [
{'key': key, 'value': data[key], 'operator': '=='} for key in data