dont fail if item has not steams

This commit is contained in:
j 2012-09-11 14:36:25 +02:00
parent 92940398a6
commit e2c61e4a78
1 changed files with 2 additions and 1 deletions

View File

@ -1060,7 +1060,8 @@ def item_xml(request, id):
item = qs[0]
j = item.get_json()
j['layers'] = item.get_layers(request.user)
j['resolution'] = {'width': j['resolution'][0], 'height':j['resolution'][1]}
if 'resolution' in j:
j['resolution'] = {'width': j['resolution'][0], 'height':j['resolution'][1]}
def xmltree(root, key, data):
if isinstance(data, list) or \
isinstance(data, tuple):