Closed dragon-fire-fly closed 1 year ago
This was caused by incorrect order of operations when migrating the database/creating the first user. This was solved by running python manage.py migrate admin zero followed by python manage.py migrate.
This was solved with reference to this Stack Overflow article.
Describe the bug The below error message was seen in the terminal when trying to create/update/delete a user in the admin panel:
The above exception (insert or update on table "django_admin_log" violates foreign key constraint "django_admin_log_user_id_c564eba6_fk_auth_user_id" DETAIL: Key (user_id)=(1) is not present in table "auth_user". ) was the direct cause of the following exception:
To Reproduce Steps to reproduce the behavior:
Expected behavior A new user should be created with the credentials entered on the previous screen
Screenshots
Desktop (please complete the following information):