use data['positions']
This commit is contained in:
parent
c7157d5001
commit
88c800a093
6 changed files with 6 additions and 6 deletions
|
@ -76,7 +76,7 @@ def findChangeLogs(request, data):
|
||||||
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
||||||
elif 'positions' in data:
|
elif 'positions' in data:
|
||||||
ids = list(qs.values_list('id', flat=True))
|
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:
|
else:
|
||||||
response['data']['items'] = qs.count()
|
response['data']['items'] = qs.count()
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
|
|
|
@ -207,7 +207,7 @@ def findEvents(request, data):
|
||||||
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
||||||
elif 'positions' in data:
|
elif 'positions' in data:
|
||||||
ids = list(qs.values_list('id', flat=True))
|
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:
|
else:
|
||||||
response['data']['items'] = qs.count()
|
response['data']['items'] = qs.count()
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ def findErrorLogs(request, data):
|
||||||
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
||||||
elif 'positions' in data:
|
elif 'positions' in data:
|
||||||
ids = list(qs.values_list('id', flat=True))
|
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:
|
else:
|
||||||
response['data']['items'] = qs.count()
|
response['data']['items'] = qs.count()
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
|
|
|
@ -134,7 +134,7 @@ def findNames(request, data):
|
||||||
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
||||||
elif 'positions' in data:
|
elif 'positions' in data:
|
||||||
ids = list(qs.values_list('id', flat=True))
|
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:
|
else:
|
||||||
response['data']['items'] = qs.count()
|
response['data']['items'] = qs.count()
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
|
|
|
@ -255,7 +255,7 @@ def findPlaces(request, data):
|
||||||
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
||||||
elif 'positions' in data:
|
elif 'positions' in data:
|
||||||
ids = list(qs.values_list('id', flat=True))
|
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:
|
else:
|
||||||
response['data']['items'] = qs.count()
|
response['data']['items'] = qs.count()
|
||||||
response['data']['area'] = qs.aggregate(
|
response['data']['area'] = qs.aggregate(
|
||||||
|
|
|
@ -133,7 +133,7 @@ def findTitles(request, data):
|
||||||
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
response['data']['position'] = utils.get_positions(ids, [qs[0].public_id])[0]
|
||||||
elif 'positions' in data:
|
elif 'positions' in data:
|
||||||
ids = list(qs.values_list('id', flat=True))
|
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:
|
else:
|
||||||
response['data']['items'] = qs.count()
|
response['data']['items'] = qs.count()
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
|
|
Loading…
Reference in a new issue