cleanup
This commit is contained in:
parent
7ae02d5678
commit
2e246dd06e
1 changed files with 1 additions and 3 deletions
|
@ -702,9 +702,7 @@ def lookup(request, data):
|
||||||
i = None
|
i = None
|
||||||
if 'id' in data:
|
if 'id' in data:
|
||||||
i = models.Item.objects.get(public_id=data['id'])
|
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 filter(None, [d not in ('title', 'year', 'director') for d in data.keys()]):
|
||||||
key = data.keys()[0]
|
|
||||||
value = data[key]
|
|
||||||
qs = models.Item.objects.find({'query': {
|
qs = models.Item.objects.find({'query': {
|
||||||
'conditions': [
|
'conditions': [
|
||||||
{'key': key, 'value': data[key], 'operator': '=='} for key in data
|
{'key': key, 'value': data[key], 'operator': '=='} for key in data
|
||||||
|
|
Loading…
Reference in a new issue