diff --git a/pillar/web/nodes/attachments.py b/pillar/web/nodes/attachments.py index ce9d8936..1eecf948 100644 --- a/pillar/web/nodes/attachments.py +++ b/pillar/web/nodes/attachments.py @@ -22,7 +22,7 @@ def render_attachments(node, field_value): # TODO: cache this based on the node's etag and attachment links expiry. - node_attachments = node[u'properties'][u'attachments'] + node_attachments = node.properties.attachments or {} if isinstance(node_attachments, list): log.warning('Old-style attachments property found on node %s. Ignoring them, ' 'will result in attachments not being found.', node[u'_id'])