Reformatted manage.py

This commit is contained in:
Sybren A. Stüvel 2016-05-06 12:11:55 +02:00
parent 6f193da89d
commit 410ecac78c

View File

@ -386,6 +386,7 @@ def add_parent_to_nodes():
sys.stdout = UTF8Writer(sys.stdout) sys.stdout = UTF8Writer(sys.stdout)
nodes_collection = app.data.driver.db['nodes'] nodes_collection = app.data.driver.db['nodes']
def find_parent_project(node): def find_parent_project(node):
if node and 'parent' in node: if node and 'parent' in node:
parent = nodes_collection.find_one({'_id': node['parent']}) parent = nodes_collection.find_one({'_id': node['parent']})
@ -394,6 +395,7 @@ def add_parent_to_nodes():
return node return node
else: else:
return None return None
nodes = nodes_collection.find() nodes = nodes_collection.find()
nodes_index = 0 nodes_index = 0
nodes_orphan = 0 nodes_orphan = 0
@ -519,7 +521,6 @@ def convert_assets_to_textures(project_id):
import pprint import pprint
pprint.pprint(node) pprint.pprint(node)
nodes_collection = app.data.driver.db['nodes'] nodes_collection = app.data.driver.db['nodes']
for n in nodes_collection.find({'project': ObjectId(project_id)}): for n in nodes_collection.find({'project': ObjectId(project_id)}):
@ -707,6 +708,7 @@ def files_make_public_t():
except Exception: except Exception:
pass pass
@manager.command @manager.command
def subscribe_node_owners(): def subscribe_node_owners():
"""Automatically subscribe node owners to notifications for items created """Automatically subscribe node owners to notifications for items created