Skip to content

'ArrayField' has no attribute '_meta' #142

@robrichter

Description

@robrichter

I have django model with Postgres specific field type ArrayField

class Dataset(behaviors.CreatedEdited):
    fields = ArrayField(models.CharField(max_length=31), null=True)

When calling mixer.blend(Dataset) it fails:
FAILED dmx_server/apps/vydej/tests/test_orders.py::test_order - AttributeError: Mixer (<class 'dmx_server.apps.vydej.models.Publishset'>): type object 'ArrayField' has no attribute '_meta'

Error can be avoided by adding parameter on creation
mixer.blend(Dataset, fields=["aaa", "bbb"])

But I have more complicated use case where ArrayField is used in through model. When I set mixer.register(PublishsetsDataset, fields=None) I evade problem with ArrayField but creation fails anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions