Orphan finder: fix bug when no orphan files are found

This commit is contained in:
Sybren A. Stüvel 2017-09-13 11:23:00 +02:00
parent d01b498ad5
commit 5ce02bbbfe

View File

@ -616,6 +616,10 @@ def find_orphan_files(proj_url):
orphans = _find_orphan_files(project['_id'])
if not orphans:
log.info('No orphan files found, congratulations.')
return 0
aggr = files_coll.aggregate([
{'$match': {'_id': {'$in': list(orphans)}}},
{'$group': {