First time here? Check out the FAQ!
2

Django user admin interface operations will be failed
 

For all users created with the login dialog all operations in the Django user admin interface will be failed with following exception (example for user 1):

Request Method: POST Request URL: http://<host>:<port>/admin/auth/user/1/ Django Version: 1.4 Exception Type: IntegrityError Exception Value:

update or delete on table "auth_user_groups" violates foreign key constraint "authusergroups_ptr_id_refs_id_5cdfc23b7859c44e" on table "askbot_groupmembership" DETAIL: Key (id)=(1) is still referenced from table "askbot_groupmembership".

Exception Location: /usr/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py in _commit, line 235 Python Executable: /usr/bin/python Python Version: 2.7.3

Why conflicts the Askbot user administration with the underlying Django user administration? Is this a known issue?

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)
ml's avatar
1
ml
asked 11 years ago

Comments

see more comments

1 Answer

1

It is a known issue. We have patched the table linking group with user with a new field level and Django admin does not like this, we'd need to add our own table instead.

There will also be a reverse issue - when you change group memberships via the django admin, we'll need to make sure that our records are also in sync (each group membership must be associated with the level parameter which can be 0 - "pending" and 1 - "full".

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)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago
link

Comments

see more comments