Dumped data python manage.py dumpdata --format json --indent 4 --exclude auth.permission --exclude contenttypes > app/fixtures/app_test_data.json
Running python manage.py test app, I get the following error:
IntegrityError: Problem installing fixtures: The row in table 'django_admin_log' with primary key '517' has an invalid foreign key: django_admin_log.content_type_id contains a value '28' that does not have a corresponding value in django_content_type.id.
Any ideas? I've had a lot of similar issues using dumpdata/Django's test-runner.
If:
python manage.py dumpdata --exclude auth.permission --exclude contenttypes > db.json
You may recover the information trapped in the json with a text editor, opening the file and deleting the elements associate with the admin.logentry model.
That worked for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With