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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Nikhil's avatar
79
Nikhil
asked 11 years ago
Evgeny's avatar
13.2k
Evgeny
updated 11 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
jeffmad's avatar
33
jeffmad
answered 11 years ago
link

Comments

see more comments