Skip to content

ModelChooserBlock label needs to be passed down Block init #26

Description

@mojeto

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions