Ask Your Question
0

Unable to add second user after fresh install and using postgresql

asked 2013-11-22 12:57:35 -0600

Nikhil gravatar image

updated 2013-11-23 14:54:54 -0600

Evgeny gravatar image

I am getting the following error. I was able to add myself as super user. I then visited Admin portal and tried to add a staff member.

IntegrityError at /admin/auth/user/2/
update or delete on table "auth_user_groups" violates foreign key constraint "authusergroups_ptr_id_refs_id_e728db87" on table "askbot_groupmembership"
DETAIL:  Key (id)=(3) is still referenced from table "askbot_groupmembership".
Request Method: POST
Request URL:    http://127.0.0.18888/admin/auth/user/2/
Django Version: 1.5
Exception Type: IntegrityError
Exception Value:    
update or delete on table "auth_user_groups" violates foreign key constraint "authusergroups_ptr_id_refs_id_e728db87" on table "askbot_groupmembership"
DETAIL:  Key (id)=(3) is still referenced from table "askbot_groupmembership".
Exception Location: /usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py in _commit, line 240
Python Executable:  /usr/bin/python
Python Version: 2.7.3
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-11-22 14:56:03 -0600

jeffmad gravatar image

/admin seems to be broken. I received the same error when trying to promote a user to super user. Evgeny had responded by suggesting that some extra code is needed in the signal handler to do the delete.

I also experienced a lot of errors when running the migrations, errors that stopped the script, after the initial syncdb.

You could add the user via the signup page or wait for a fix.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-11-22 12:57:35 -0600

Seen: 204 times

Last updated: Nov 23 '13