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 Empty Queryset for Unbound Filter Form #987

Conversation

deanpienaar
Copy link

Fix for #930

Changes

  1. If the filter form is not bound. return what the list view would return by default.
  2. Fix the values of a test that were incorrect but passing.

@deanpienaar
Copy link
Author

deanpienaar commented Oct 25, 2018

@carltongibson Not certain why the build is failing but seems to be the same issue as with #985.

@carltongibson
Copy link
Owner

Hey @deanpienaar. OK thanks. I'll sort it out. 👍

@rpkilby
Copy link
Collaborator

rpkilby commented Oct 25, 2018

We might need to upgrade/downgrade tox/detox here. There has been a lot of development going on in that project, and there have been some breaking changes here and there.

@rpkilby
Copy link
Collaborator

rpkilby commented Oct 25, 2018

Actually, I'm kind of inclined to just remove detox altogether. The test suite itself is fairly quick, and we don't gain much by parallelizing the tox test runs. The majority of the time spent in each Travis job is just standing up the VM.

@carltongibson
Copy link
Owner

Yep. And for me, I’m happy to click through. It makes the results the same in CI as locally.

(Wasn’t sure we needed 3x “latest” builds when I was looking at it today...)

@deanpienaar deanpienaar force-pushed the deanpienaar/change/return_views_original_queryset_if_not_bound branch from e138d85 to a405960 Compare November 1, 2018 14:40
@codecov-io
Copy link

codecov-io commented Nov 1, 2018

Codecov Report

Merging #987 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #987      +/-   ##
==========================================
+ Coverage   98.33%   98.33%   +<.01%     
==========================================
  Files          15       15              
  Lines        1198     1200       +2     
==========================================
+ Hits         1178     1180       +2     
  Misses         20       20
Impacted Files Coverage Δ
django_filters/views.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 2ceaaab...d5d1418. Read the comment docs.

@deanpienaar
Copy link
Author

Hi @carltongibson. Thanks! Seems the build is passing now.

@deanpienaar
Copy link
Author

Hi @carltongibson! Is there anything more I can do to get this merged 😄

@carltongibson
Copy link
Owner

Hi @deanpienaar. I'm working for v2.1 over the holidays. (Next week essentially.) This'll be part of that.

@rpkilby
Copy link
Collaborator

rpkilby commented Dec 12, 2018

I'm also eventually getting around to reviewing this+working on the original issue. I had worked on this over the Thanksgiving holiday, but something caused a hard drive partition failure and I lost all of my data 🤦‍♂️

@rpkilby
Copy link
Collaborator

rpkilby commented Dec 12, 2018

iirc, this was only part of the issue. There was more work to be done revolving around the strict parameter. Can't remember if those two are intrinsically tied together.

@deanpienaar
Copy link
Author

@rpkilby Sorry about your hard drive 😢.

Can't remember if those two are intrinsically tied together.

It seems they are. I took the approach of "If the filterset form isn't bound, it shouldn't be doing anything at all". Not sure if that's what is preferred.

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.

None yet

4 participants