diff --git a/pillar/api/activities.py b/pillar/api/activities.py index dad3b2cc..efc7ffd7 100644 --- a/pillar/api/activities.py +++ b/pillar/api/activities.py @@ -17,6 +17,11 @@ def notification_parse(notification): if activity is None or activity['object_type'] != 'node': return node = nodes_collection.find_one({'_id': activity['object']}) + if not node: + # This can happen when a notification is generated and then the + # node is deleted. + return + # Initial support only for node_type comments if node['node_type'] != 'comment': return