BeanieODM / beanie

Asynchronous Python ODM for MongoDB
http://beanie-odm.dev/
Apache License 2.0
2.02k stars 215 forks source link

Index Error Fix #811

Closed gaurav25122000 closed 6 months ago

gaurav25122000 commented 9 months ago

Added conversion for float to int for existing indexes while being fetched from mongo database due to pymongo check of indexes being 1,-1 or 2d

roman-right commented 9 months ago

Hi @gaurav25122000 Thank you for the PR! Could you please add a test for this?

matez0 commented 8 months ago

To help other potential contributors to understand the code and the change, it would be nice to give a context in the pull request description or a reference to the issue where the context is given.

About the commit message:

Added conversion for float to int for existing indexes while being fe…
…tched from mongo database due to pymongo check of indexes being 1,-1 or 2d

According to git conventions, the subject should be in imperative present tense. The current subject is not a sentence and ambiguous (added is not a past tense verb in correct grammar).

Convert float indexes to int while being fetched from mongo database due to pymongo check of indexes being 1,-1 or 2d

This is already in imperative present tense, but for me, it is not clear what the part due to... means and it is too long. The subject line should give a hint why the change was needed and the details part of the commit message should explain why in simple technical English. What the change is that is visible in the diff.

These could cost some effort for the contributor, but would save time for others and speed up the development of the project.

gaurav25122000 commented 8 months ago

Hi @gaurav25122000 Thank you for the PR! Could you please add a test for this?

Can't find the test cases for this particular function

roman-right commented 8 months ago

Can't find the test cases for this particular function

This is true. Could you please add one? @gaurav25122000

github-actions[bot] commented 6 months ago

This PR is stale because it has been open 45 days with no activity.

github-actions[bot] commented 6 months ago

This PR was closed because it has been stalled for 14 days with no activity.

97k commented 1 month ago

I am facing this same issue. is it going to make it in next release?

I moved a lot of code from my custom wrapper to beanie only to find out I am not able to use it because of this issue!

97k commented 1 month ago

I can add a test quick if @gaurav25122000 is not working on this one?

cc: @roman-right