This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 69e05a0b7076b905d1b1fc22c39b562259269dc7
Author: Dillon Walls <[email protected]>
AuthorDate: Thu Jan 26 16:36:44 2023 +0000

    [#8495] fix DeprecationWarning pymongo - 'remove' -> 'delete_many/one'
---
 Allura/allura/command/show_models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Allura/allura/command/show_models.py 
b/Allura/allura/command/show_models.py
index 4540bf5f5..aa06ef600 100644
--- a/Allura/allura/command/show_models.py
+++ b/Allura/allura/command/show_models.py
@@ -353,7 +353,7 @@ class EnsureIndexCommand(base.Command):
                 base.log.info('Found dupes with %s', key)
                 dupes += [doc['_id'] for doc in docs[1:]]
         collection.drop_index(iname)
-        collection.remove(dict(_id={'$in': dupes}))
+        collection.delete_many(dict(_id={'$in': dupes}))
 
 
 def build_model_inheritance_graph():

Reply via email to