From 4280e0175b44a34c39f4116d8fed41ab324df012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 2 Nov 2016 17:16:53 +0100 Subject: [PATCH] CLI upgrade_attachment_schema: only upgrade non-deleted nodes --- pillar/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pillar/cli.py b/pillar/cli.py index db004f5d..62f5da7f 100644 --- a/pillar/cli.py +++ b/pillar/cli.py @@ -697,6 +697,7 @@ def upgrade_attachment_schema(proj_url=None, all_projects=False): def replace_attachments(project): log.info('Upgrading nodes for project %s', project['url']) nodes = nodes_coll.find({ + '_deleted': False, 'project': project['_id'], 'node_type': {'$in': list(nts_by_name)}, 'properties.attachments': {'$exists': True},