From c1469b7097088675a65f57a0740ec6778b5297ba Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 11 Jan 2014 09:58:04 +0000 Subject: [PATCH] dont overwrite id --- pandora/item/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index 0c1a14547..e39b14865 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -1243,18 +1243,18 @@ def item(request, id): ] data = [] - for id in keys: - value = item.get(id) - key = utils.get_by_id(settings.CONFIG['itemKeys'], id) + for k in keys: + value = item.get(k) + key = utils.get_by_id(settings.CONFIG['itemKeys'], k) if value: - title = key['title'] if key else id.capitalize() + title = key['title'] if key else k.capitalize() if isinstance(value, list): value = value = u', '.join([unicode(v) for v in value]) elif key and key.get('type') == 'float': value = '%0.3f' % value - elif key and key.get('type') == 'time': + elif key and key.get('type') == 'time': value = ox.format_duration(value * 1000) - data.append({'key': id, 'title': title, 'value': value}) + data.append({'key': k, 'title': title, 'value': value}) clips = [] clip = {'in': 0, 'annotations': []} #logged in users should have javascript. not adding annotations makes load faster