Skip to content

Conversation

neturmel
Copy link
Contributor

@neturmel neturmel commented Dec 5, 2024

Pull Request Template

Summary

MongoDB count() function was deprecated, so it must be replaced with countDocuments()

Change Type

Please delete any irrelevant options.

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Translation update

Testing

It is only a change of a function name

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

Copy link

@yanglicb yanglicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also found it and thought the same, thank you!

@neturmel neturmel changed the title replaced deprecated MongoDB count() with countDocuments fix: replaced deprecated MongoDB count() with countDocuments Dec 6, 2024
@wipash
Copy link
Contributor

wipash commented Dec 11, 2024

If you need a short term workaround in a running container:

sed -i 's/\.count(/\.countDocuments(/g' config/user-stats.js

@danny-avila
Copy link
Owner

thanks, cherry-picked this commit in #4951

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.

4 participants