From 772c28eaef3c6032b0f5c4d2b8f05002092e3850 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Wed, 25 Nov 2015 16:22:36 +0100 Subject: [PATCH] Fix for parent_id check on manage.py --- pillar/manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/manage.py b/pillar/manage.py index 6fedc087..6652dd45 100644 --- a/pillar/manage.py +++ b/pillar/manage.py @@ -254,11 +254,11 @@ def embed_children_in_files(): if 'parent' in f: # Get the parent node parent = files_collection.find_one({'_id': f['parent']}) - parent_id = parent['_id'] if not parent: print "No parent found for {0}".format(file_id) files_collection.remove({'_id': file_id}) continue + parent_id = parent['_id'] # Prepare to loop through the properties required for a variation properties = ['content_type', 'duration', 'size', 'format', 'width', 'height', 'length', 'md5', 'file_path']