Fixed two mistakes in stats query count_nodes()

- 'p.x' → 'project.x'
- is_private: {$ne: true} → is_private: False, because true is the default.
This commit is contained in:
2017-09-12 11:29:36 +02:00
parent ea0f88b4b8
commit f4ac9635a9
2 changed files with 43 additions and 2 deletions

View File

@@ -24,10 +24,10 @@ def count_nodes(query=None) -> int:
{
'$project':
{
'p.is_private': 1,
'project.is_private': 1,
}
},
{'$match': {'p.is_private': {'$ne': True}}},
{'$match': {'project.is_private': False}},
{'$count': 'tot'}
]
c = current_app.db()['nodes']