Fix for non existing attachments
This commit is contained in:
parent
8cc2cfb189
commit
6f460ee127
@ -22,7 +22,7 @@ def render_attachments(node, field_value):
|
|||||||
|
|
||||||
# TODO: cache this based on the node's etag and attachment links expiry.
|
# 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):
|
if isinstance(node_attachments, list):
|
||||||
log.warning('Old-style attachments property found on node %s. Ignoring them, '
|
log.warning('Old-style attachments property found on node %s. Ignoring them, '
|
||||||
'will result in attachments not being found.', node[u'_id'])
|
'will result in attachments not being found.', node[u'_id'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user