Orphan finder: fix bug when no orphan files are found
This commit is contained in:
parent
d01b498ad5
commit
5ce02bbbfe
@ -616,6 +616,10 @@ def find_orphan_files(proj_url):
|
|||||||
|
|
||||||
orphans = _find_orphan_files(project['_id'])
|
orphans = _find_orphan_files(project['_id'])
|
||||||
|
|
||||||
|
if not orphans:
|
||||||
|
log.info('No orphan files found, congratulations.')
|
||||||
|
return 0
|
||||||
|
|
||||||
aggr = files_coll.aggregate([
|
aggr = files_coll.aggregate([
|
||||||
{'$match': {'_id': {'$in': list(orphans)}}},
|
{'$match': {'_id': {'$in': list(orphans)}}},
|
||||||
{'$group': {
|
{'$group': {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user