Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading fixtures for admin-index generates an error #89

Open
swehba opened this issue Nov 27, 2023 · 1 comment
Open

Loading fixtures for admin-index generates an error #89

swehba opened this issue Nov 27, 2023 · 1 comment

Comments

@swehba
Copy link

swehba commented Nov 27, 2023

When saving fixtures including appgroup and appgroup_models and then loading those fixtures, we get the following error message:

django.db.utils.IntegrityError: Problem installing fixture '/Users/.../fixtures/admin_index_appgroup_models.json': Could not load admin_index.AppGroup_models(pk=9): UNIQUE constraint failed: admin_index_appgroup_models.appgroup_id, admin_index_appgroup_models.contenttypeproxy_id

However, when we then open the Admin portal, the app groups appears correctly. Any idea what might be going on?

@sergei-maertens
Copy link
Member

Are you dumping the fixtures with natural (foreign) keys? I suspect not, and then you get conflicting IDs sometimes 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants