From 88c800a093d10c6bad4bb6d21720a88e0f2da86f Mon Sep 17 00:00:00 2001 From: j Date: Thu, 30 Jun 2016 16:42:56 +0200 Subject: [PATCH] use data['positions'] --- pandora/changelog/views.py | 2 +- pandora/event/views.py | 2 +- pandora/log/views.py | 2 +- pandora/person/views.py | 2 +- pandora/place/views.py | 2 +- pandora/title/views.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora/changelog/views.py b/pandora/changelog/views.py index 226a7c3ec..ba6e44ab1 100644 --- a/pandora/changelog/views.py +++ b/pandora/changelog/views.py @@ -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) diff --git a/pandora/event/views.py b/pandora/event/views.py index 4f8b7ec75..87a8cef34 100644 --- a/pandora/event/views.py +++ b/pandora/event/views.py @@ -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() diff --git a/pandora/log/views.py b/pandora/log/views.py index e96e25d45..9c84674f0 100644 --- a/pandora/log/views.py +++ b/pandora/log/views.py @@ -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) diff --git a/pandora/person/views.py b/pandora/person/views.py index 75962b8e3..e4e693f44 100644 --- a/pandora/person/views.py +++ b/pandora/person/views.py @@ -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) diff --git a/pandora/place/views.py b/pandora/place/views.py index 9c220e755..381bb0636 100644 --- a/pandora/place/views.py +++ b/pandora/place/views.py @@ -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( diff --git a/pandora/title/views.py b/pandora/title/views.py index fc08e3ada..78313b107 100644 --- a/pandora/title/views.py +++ b/pandora/title/views.py @@ -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)