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 for combining raw and regular filters #2264

Merged

Conversation

Pacu2
Copy link
Contributor

@Pacu2 Pacu2 commented Feb 4, 2020

close #2263

@Pacu2 Pacu2 requested a review from bagerard February 4, 2020 11:43
@Pacu2
Copy link
Contributor Author

Pacu2 commented Feb 4, 2020

Travis build for Python 2.7 is failing but it does not seem related to my changes
pkg_resources.DistributionNotFound: The 'zipp>=0.5' distribution was not found and is required by importlib-metadata

@Pacu2
Copy link
Contributor Author

Pacu2 commented Feb 20, 2020

@bagerard do you mind taking a look at this? The current behavior is as follows:

In [9]: from mongoengine.queryset import transform
In [10]: transform.query(name=["Mark"], __raw__={"name": {"$in": ["Tom"]}})
Out[10]: {'name': ['Mark']}

@bagerard
Copy link
Collaborator

bagerard commented Mar 2, 2020

HI @Pacu2 , many thanks for the PR and apologize for the delay. The problem with zipp was fixed (was due to some secondary dependency that we weren't pinning and that dropped support for python2). Could you pull master in your branch and push that? I'll review this in the next days

@Pacu2 Pacu2 force-pushed the 2263/combining-raw-and-regular-queries branch from 45ca1af to fda2e2b Compare March 3, 2020 14:19
@Pacu2
Copy link
Contributor Author

Pacu2 commented Mar 3, 2020

@bagerard Just rebased with the latest master

Copy link
Collaborator

@bagerard bagerard left a comment

Choose a reason for hiding this comment

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

LGTM

@bagerard bagerard merged commit a4d11ee into MongoEngine:master Mar 3, 2020
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.

Bug: Combining raw and regular filter for the same field produces wrong result on DynamicDocuments
2 participants