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 = []
|
||||
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':
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue