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

ModelChooserBlock label needs to be passed down Block init #26

Open
mojeto opened this issue Aug 14, 2019 · 0 comments
Open

ModelChooserBlock label needs to be passed down Block init #26

mojeto opened this issue Aug 14, 2019 · 0 comments
Labels

Comments

@mojeto
Copy link

mojeto commented Aug 14, 2019

Setting explicit label on any RemoteModelChooserBlock doesn't work, because the value ends up on

self.label = options.pop('label', chooser)

but self.label gets overwritten in parent Block.init

Also it's mandatory for label to be set on self.meta.label as well for Wagtail block to work properly. Otherwise label value gets overwritten in https://github.com/wagtail/wagtail/blob/7c3418f99e7b2c2da7ad19b2840d73099dadc6a7/wagtail/core/blocks/base.py#L104

@mojeto mojeto added the bug label Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant