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

wagtail 2.10 can_delete() got an unexpected keyword argument 'ignore_bulk' #186

Closed
DIGIREN opened this issue Aug 17, 2020 · 1 comment · Fixed by #188
Closed

wagtail 2.10 can_delete() got an unexpected keyword argument 'ignore_bulk' #186

DIGIREN opened this issue Aug 17, 2020 · 1 comment · Fixed by #188

Comments

@DIGIREN
Copy link

DIGIREN commented Aug 17, 2020

Found a bug, please fill out the sections below

Issue summary

can_delete() got an unexpected keyword argument 'ignore_bulk' When trying to move translatable pages.

How to reproduce?

Spin up a wagtail 2.10 site, set up a translatable site root page, create some translatablepages under that, and then try to move a translatable page.

Technical details

Python 3.7 Wagtail 2.10 Wagtailtrans 2.1

This appears to be because wagtail's can_delete() method now gets passed an optional argument ignore_bulk in 2.10

I believe I did find a fix for this one already, this is because wagtailtrans.permissions overrides this can_delete method without passing through the new parameter. Basically this line needs changed to def can_delete(self, ignore_bulk=False):

And this line needs changed to return super().can_delete(ignore_bulk)

This along with the previous issue I opened, are the only two instances of incompatibility with 2.10 I have found so far. If anyone is interested, I can throw together a pull request for this as well as the previous issue I posted related to request.site

@DIGIREN
Copy link
Author

DIGIREN commented Aug 17, 2020

Just found one related issue

Wagtail 2.10's move() function now also takes a user parameter. After fixing the issue above I was still getting an error: move() got an unexpected keyword argument 'user'. After changing this line to def move(self, target, pos=None, suppress_sync=False, user=None): as well as the changes mentioned above, move() should be fixed for 2.10

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 a pull request may close this issue.

1 participant