use data['positions']

This commit is contained in:
j 2016-06-30 16:42:56 +02:00
parent c7157d5001
commit 88c800a093
6 changed files with 6 additions and 6 deletions

View file

@ -76,7 +76,7 @@ def findChangeLogs(request, data):
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
elif 'positions' in data:
ids = list(qs.values_list('id', flat=True))
response['data']['positions'] = utils.get_positions(ids, query['positions'], decode_id=True)
response['data']['positions'] = utils.get_positions(ids, data['positions'], decode_id=True)
else:
response['data']['items'] = qs.count()
return render_to_json_response(response)

View file

@ -207,7 +207,7 @@ def findEvents(request, data):
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
elif 'positions' in data:
ids = list(qs.values_list('id', flat=True))
response['data']['positions'] = utils.get_positions(ids, query['positions'], decode_id=True)
response['data']['positions'] = utils.get_positions(ids, data['positions'], decode_id=True)
else:
response['data']['items'] = qs.count()

View file

@ -124,7 +124,7 @@ def findErrorLogs(request, data):
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
elif 'positions' in data:
ids = list(qs.values_list('id', flat=True))
response['data']['positions'] = utils.get_positions(ids, query['positions'], decode_id=True)
response['data']['positions'] = utils.get_positions(ids, data['positions'], decode_id=True)
else:
response['data']['items'] = qs.count()
return render_to_json_response(response)

View file

@ -134,7 +134,7 @@ def findNames(request, data):
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
elif 'positions' in data:
ids = list(qs.values_list('id', flat=True))
response['data']['positions'] = utils.get_positions(ids, query['positions'], decode_id=True)
response['data']['positions'] = utils.get_positions(ids, data['positions'], decode_id=True)
else:
response['data']['items'] = qs.count()
return render_to_json_response(response)

View file

@ -255,7 +255,7 @@ def findPlaces(request, data):
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
elif 'positions' in data:
ids = list(qs.values_list('id', flat=True))
response['data']['positions'] = utils.get_positions(ids, query['positions'], decode_id=True)
response['data']['positions'] = utils.get_positions(ids, data['positions'], decode_id=True)
else:
response['data']['items'] = qs.count()
response['data']['area'] = qs.aggregate(

View file

@ -133,7 +133,7 @@ def findTitles(request, data):
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
elif 'positions' in data:
ids = list(qs.values_list('id', flat=True))
response['data']['positions'] = utils.get_positions(ids, query['positions'], decode_id=True)
response['data']['positions'] = utils.get_positions(ids, data['positions'], decode_id=True)
else:
response['data']['items'] = qs.count()
return render_to_json_response(response)