Closed osvill closed 4 years ago
After some further research I noticed, this isn't an issue of mixer. It's the fact, that the custom field will create a generated column at the database and django tries to insert a value and can't skip this field.
In case of mixer you can use the approach from the docs. But for Django you have to override the model's save
method (exclude all SearchVectorField
before saving) and maybe create a custom manager for the bulk_create
method.
Hi,
I'm encountering fails with models that have (custom) SearchVectorField model fields.
Example models:
and following test:
I receive following error:
I use following versions:
I know
mixer
is currently only compatible withDjango 2.1
as mentioned in the requirements. But I'm still able to use mixer in other tests withDjango 3.0.4
except when usingSearchVectorField
. According to django's documentationSearchVectorField
has been available sinceDjango 1.10
.Is there a possibility to add a functionality for
SearchVectorField
?Thanks