CLI upgrade_attachment_schema: stop when a node cannot be saved.

This commit is contained in:
Sybren A. Stüvel 2016-11-02 17:17:15 +01:00
parent 4280e0175b
commit aa3340ddbe

View File

@ -721,7 +721,7 @@ def upgrade_attachment_schema(proj_url=None, all_projects=False):
r, _, _, status = put_internal('nodes', db_node, _id=node['_id'])
if status != 200:
log.error('Error %i storing altered node %s: %s', status, node['_id'], r)
return
raise SystemExit('Error storing node; see log.')
if all_projects:
for proj in projects_coll.find():