forked from 0x2620/pandora
dont overwrite id
This commit is contained in:
parent
d4ff2b60ef
commit
c1469b7097
1 changed files with 6 additions and 6 deletions
|
@ -1243,18 +1243,18 @@ def item(request, id):
|
||||||
]
|
]
|
||||||
|
|
||||||
data = []
|
data = []
|
||||||
for id in keys:
|
for k in keys:
|
||||||
value = item.get(id)
|
value = item.get(k)
|
||||||
key = utils.get_by_id(settings.CONFIG['itemKeys'], id)
|
key = utils.get_by_id(settings.CONFIG['itemKeys'], k)
|
||||||
if value:
|
if value:
|
||||||
title = key['title'] if key else id.capitalize()
|
title = key['title'] if key else k.capitalize()
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
value = value = u', '.join([unicode(v) for v in value])
|
value = value = u', '.join([unicode(v) for v in value])
|
||||||
elif key and key.get('type') == 'float':
|
elif key and key.get('type') == 'float':
|
||||||
value = '%0.3f' % value
|
value = '%0.3f' % value
|
||||||
elif key and key.get('type') == 'time':
|
elif key and key.get('type') == 'time':
|
||||||
value = ox.format_duration(value * 1000)
|
value = ox.format_duration(value * 1000)
|
||||||
data.append({'key': id, 'title': title, 'value': value})
|
data.append({'key': k, 'title': title, 'value': value})
|
||||||
clips = []
|
clips = []
|
||||||
clip = {'in': 0, 'annotations': []}
|
clip = {'in': 0, 'annotations': []}
|
||||||
#logged in users should have javascript. not adding annotations makes load faster
|
#logged in users should have javascript. not adding annotations makes load faster
|
||||||
|
|
Loading…
Reference in a new issue