First time here? Check out the FAQ!
0

Unable to add second user after fresh install and using postgresql

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
Nikhil's avatar
79
Nikhil
asked 2013-11-22 12:57:35 -0500
Evgeny's avatar
13.2k
Evgeny
updated 2013-11-23 14:54:54 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

/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.

jeffmad's avatar
33
jeffmad
answered 2013-11-22 14:56:03 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments