wagtail / wagtail-factories

Factory boy classes for wagtail
http://wagtail-factories.readthedocs.io/en/latest/
MIT License
102 stars 41 forks source link

StructBlockFactory does not support custom StructValue classes #72

Closed tbrlpld closed 9 months ago

tbrlpld commented 1 year ago

When using the StructBlockFactory with a StructBlock subclass that defines a custom Meta.value_class, this value class is ignored.

I think this section is the cause for that. It seems to return a StructValue, regardless if the block_class defines a value_class.

https://github.com/wagtail/wagtail-factories/blob/9db00f8c8390a29388406e99b7951415bc5b28de/src/wagtail_factories/blocks.py#L155-L160