Opened 16 years ago

Last modified 14 years ago

#8159 closed

Attempting to delete your own user account in Django admin view is not handled properly — at Initial Version

Reported by: erichs@… Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords: admin delete
Cc: bas@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

When trying to attempt your own user account from the Django admin pages, it firstly doesn't warn you or disallow such an action, and secondly fails badly with an integrity error (see below). As a side effect you can now no longer logout.:

Traceback (most recent call last):

File "C:\Users\erichs\Documents\eclipse\django\django\core\servers\basehttp.py", line 277, in run

self.result = application(self.environ, self.start_response)

File "C:\Users\erichs\Documents\eclipse\django\django\core\servers\basehttp.py", line 634, in call

return self.application(environ, start_response)

File "C:\Users\erichs\Documents\eclipse\django\django\core\handlers\wsgi.py", line 221, in call

response = middleware_method(request, response)

File "C:\Users\erichs\Documents\eclipse\django\django\middleware\transaction.py", line 25, in process_response

transaction.commit()

File "C:\Users\erichs\Documents\eclipse\django\django\db\transaction.py", line 157, in commit

connection._commit()

File "C:\Users\erichs\Documents\eclipse\django\django\db\backends\init.py", line 23, in _commit

return self.connection.commit()

IntegrityError: update or delete on table "auth_user" violates foreign key constraint "auth_message_user_id_fkey" on table "auth_message"
DETAIL: Key (id)=(1) is still referenced from table "auth_message".

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top