diff --git a/pandora/item/views.py b/pandora/item/views.py index a7b9d55c3..accb25137 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -702,9 +702,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()]): - key = data.keys()[0] - value = data[key] + elif not 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