﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
8159	Attempting to delete your own user account in Django admin view is not handled properly	erichs@…	nobody	"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"".


"		new	contrib.admin	dev			admin delete		Unreviewed	0	0	0	0		0
