gregmuellegger / django-autofixture

Can create auto-generated test data.
BSD 3-Clause "New" or "Revised" License
460 stars 118 forks source link

Error with Django 2: TypeError: Direct assignment to the forward side of a many-to-many set is prohibited. #104

Open davethecipo opened 6 years ago

davethecipo commented 6 years ago

Hi, I'm very new to Django and to this plugin too, so please be patient.

I wanted to report this error when using the package with Django 2. I have a minimal working example here. The error can be reproduced following these steps

git clone https://github.com/davethecipo/autofixture-django2-bug.git
cd autofixture-django2-bug
python3 -m venv venv35
## activate virtual environment, then run
cd project
pip install -r requirements.txt
./run.sh
erayerdin commented 6 years ago

(Sorry, misclicked and deleted.)

Probably related to #103.

jamiecounsell commented 6 years ago

107 fixes this - I've created a subclass of AutoFixture with those changes in the meantime. It seems like the CI failures for #107 are mostly build issues with Travis' change to the build agents. I've had a ton of issues with them removing certain python versions from the base image.

Scharfsinnig commented 6 years ago

Maybe this could help you: https://stackoverflow.com/questions/50015204/direct-assignment-to-the-forward-side-of-a-many-to-many-set-is-prohibited-use-e?noredirect=1&lq=1