当我尝试添加内容或课程时出现此错误。它工作正常,现在我收到此错误。我已经将它上传到heroku,它工作正常,只是在本地开发中它不会添加任何东西。有人可以解释发生了什么问题。请指定我应该添加哪些附加信息?
IntegrityError at /admin/course/course/add/
insert or update on table "django_admin_log" violates foreign key constraint "django_admin_log_user_id_fkey"
DETAIL: Key (user_id)=(2) is not present in table "auth_user".
Request Method: POST
Request URL: http://127.0.0.1:8888/admin/course/course/add/
Django Version: 1.5.1
Exception Type: IntegrityError
Exception Value:
insert or update on table "django_admin_log" violates foreign key constraint "django_admin_log_user_id_fkey"
DETAIL: Key (user_id)=(2) is not present in table "auth_user".
Exception Location: /home/vagrant/sai/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py in _commit, line 240
Python Executable: /home/vagrant/sai/bin/python
Python Version: 2.7.3