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

Prevent declared field to have additional lookups #1019

Closed
wants to merge 2 commits into from

Conversation

akspi
Copy link

@akspi akspi commented Dec 16, 2018

I've included an extra check for all fields other than the LookupChoiceFilter to check that if a field which is specified in Meta.fields also exists in declared fields, then make sure that the lookup expressions match; ie declaration of fields in both Meta.fields and the declare fields agree on the same lookup expressions for that field.

I'm not sure if this covers all possible cases as I'm not entirely familiar with the codebase yet. Any feedback would be greatly appreciated! #1013

@codecov-io
Copy link

codecov-io commented Dec 16, 2018

Codecov Report

Merging #1019 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1019   +/-   ##
=======================================
  Coverage   98.33%   98.33%           
=======================================
  Files          15       15           
  Lines        1198     1198           
=======================================
  Hits         1178     1178           
  Misses         20       20
Impacted Files Coverage Δ
django_filters/filterset.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15683cd...59d2514. Read the comment docs.

@akspi
Copy link
Author

akspi commented Mar 22, 2019

@rpkilby Was wondering if this was still required?

@rpkilby
Copy link
Collaborator

rpkilby commented Mar 22, 2019

Hi @PaiAkshay998. You can close this. The issue isn't directly related to LookupChoiceFilter (although it happens to be used in the original SO question). I've opened #1061, which fixes this more generally.

@akspi akspi closed this Mar 27, 2019
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.

3 participants