From a10b42afe6c352a32841d91fa539c9094fa40265 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Mon, 3 Dec 2018 22:56:20 +0100 Subject: [PATCH] Find only non deleted comments --- pillar/web/nodes/finders.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pillar/web/nodes/finders.py b/pillar/web/nodes/finders.py index b1a72dd6..9c16123a 100644 --- a/pillar/web/nodes/finders.py +++ b/pillar/web/nodes/finders.py @@ -48,7 +48,10 @@ def find_for_comment(project, node): continue try: - parent = Node.find(parent.parent, api=api) + parent = Node.find_one({'where': { + '_id': parent.parent, + '_deleted': {'$ne': True} + }}, api=api) except ResourceNotFound: log.warning( 'url_for_node(node_id=%r): Unable to find parent node %r',