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 error with collectionfilter=1 not being included in batch links #65

Merged
merged 8 commits into from
Jul 18, 2019

Conversation

djay
Copy link
Member

@djay djay commented Jul 5, 2019

No description provided.

@@ -9,6 +9,6 @@ def set_content_filter(context, event):
req = event.request
if 'collectionfilter' not in req.form:
return
del req.form['collectionfilter']
# We leave collectionfilter=1 in req.form so that it gets put into batch links
Copy link
Member

Choose a reason for hiding this comment

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

The reason for removing the collectionfilter url parameter was to exit early and not have to make_query for each traversal step - which can be a lot.
Maybe we should instead check for the existance of event.request['contentFilter'] - if possible?

@djay
Copy link
Member Author

djay commented Jul 5, 2019 via email

@thet
Copy link
Member

thet commented Jul 6, 2019

@djay I'd have to step in myself and see how often this is typically called. There is a chance that this is only a micro optimization but this code is called for all path-parts (IIRC).

@djay
Copy link
Member Author

djay commented Jul 6, 2019

@thet I added the check but not sure what you all path parts you mean. its still skipping if collectionfilter=1 isn't in there so it would only other parts of collectionfilter traversals that would call make_query.

Also, any idea why 5.2 is failing? I don't think it's something I did

@djay
Copy link
Member Author

djay commented Jul 9, 2019

@thet Given this is a major bug and breaks batching can we get this merged and then worry about optimisations later?

@djay djay requested a review from thet July 10, 2019 09:55
@petschki
Copy link
Member

@djay can u resolve the conflicts? I'll merge this one if tests are green.

@djay
Copy link
Member Author

djay commented Jul 18, 2019

@petschki failing due to merging my reversion that means the rebase also removes the code :(
One reason I think it's better to do a squash then merge to close a PR. What goes on in a PR stays in a PR!

@petschki
Copy link
Member

@djay I've fixed another missing code snippet due to your rebase. Local tests are now green. I wait for travis and merge later.

@petschki petschki merged commit 1e2f8b6 into master Jul 18, 2019
@petschki petschki deleted the djay/fix_pagination branch July 18, 2019 10:06
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

3 participants