Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix recover_offline error: replace deprecated count() with countDocum… #538

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bsplu
Copy link

@bsplu bsplu commented Oct 22, 2024

Title:
Fix: Resolve error in recover_offline for compatibility with MongoDB 4.0+.

Summary

Major changes:

  • Fix: Replaced the deprecated count() function with countDocuments() in the recover_offline function to ensure compatibility with MongoDB 4.0+.

This change is required because PyMongo no longer supports the count() method. Instead, the count_documents() method from the Collection class should be used. For more details, refer to the PyMongo documentation and MongoDB documentation.

Checklist

  • I only found the recover_offline function with this issue. Other functions, such as reset, seem to have already addressed it, but please double-check. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant