MongoCollection.count() and update() are deprecated

Eve doesn't have any counting methods on `current_app.data`, so there is
no one-to-one translation for `cursor.count()` in
`file_storage/__init__.py`. Since the call was only used in a debug log
entry, I just removed it altogether.

I removed `pillar.cli.operations.index_users_rebuild()`, as it was
importing `pillar.api.utils.algolia.algolia_index_user_save` which doesn't
exist any more, so the code was dead anyway.
This commit is contained in:
2019-05-10 17:02:38 +02:00
parent 47d5c6cbad
commit 1e823a9dbe
13 changed files with 60 additions and 104 deletions

View File

@@ -690,7 +690,7 @@ class NodesReferencedByProjectTest(AbstractPillarTest):
self.node_etag = node['_etag']
with self.app.app_context():
self.app.db('projects').update(
self.app.db('projects').update_one(
{'_id': self.pid},
{'$set': {
'header_node': self.node_id,