Opened 12 years ago
Closed 12 years ago
#19144 closed Bug (duplicate)
"auth_user.password may not be NULL" IntegrityError when saving users in the admin
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | Keywords: | admin, password |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I'm receiving an IntegrityError when trying to save users in the admin. I'm using sqlite3 database backend.
Steps to reproduce:
- Log in to admin.
- Go to Users and select a user to edit
- (Edit some fields,) and submit the form.
Below is a traceback:
Environment: Request Method: POST Request URL: http://example.com/admin/auth/user/1/ Django Version: 1.5 Python Version: 2.7.3 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.admindocs') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/data/python/django/django/core/handlers/base.py" in get_response 116. response = callback(request, *callback_args, **callback_kwargs) File "/data/python/django/django/contrib/admin/options.py" in wrapper 367. return self.admin_site.admin_view(view)(*args, **kwargs) File "/data/python/django/django/utils/decorators.py" in _wrapped_view 91. response = view_func(request, *args, **kwargs) File "/data/python/django/django/views/decorators/cache.py" in _wrapped_view_func 89. response = view_func(request, *args, **kwargs) File "/data/python/django/django/contrib/admin/sites.py" in inner 202. return view(request, *args, **kwargs) File "/data/python/django/django/utils/decorators.py" in _wrapper 25. return bound_func(*args, **kwargs) File "/data/python/django/django/utils/decorators.py" in _wrapped_view 91. response = view_func(request, *args, **kwargs) File "/data/python/django/django/utils/decorators.py" in bound_func 21. return func(self, *args2, **kwargs2) File "/data/python/django/django/db/transaction.py" in inner 208. return func(*args, **kwargs) File "/data/python/django/django/contrib/admin/options.py" in change_view 1054. self.save_model(request, new_object, form, True) File "/data/python/django/django/contrib/admin/options.py" in save_model 710. obj.save() File "/data/python/django/django/db/models/base.py" in save 532. force_update=force_update, update_fields=update_fields) File "/data/python/django/django/db/models/base.py" in save_base 603. rows = manager.using(using).filter(pk=pk_val)._update(values) File "/data/python/django/django/db/models/query.py" in _update 580. return query.get_compiler(self.db).execute_sql(None) File "/data/python/django/django/db/models/sql/compiler.py" in execute_sql 997. cursor = super(SQLUpdateCompiler, self).execute_sql(result_type) File "/data/python/django/django/db/models/sql/compiler.py" in execute_sql 825. cursor.execute(sql, params) File "/data/python/django/django/db/backends/util.py" in execute 43. return self.cursor.execute(sql, params) File "/data/python/django/django/db/backends/sqlite3/base.py" in execute 360. six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2]) File "/data/python/django/django/db/backends/sqlite3/base.py" in execute 358. return Database.Cursor.execute(self, query, params) Exception Type: IntegrityError at /admin/auth/user/1/ Exception Value: auth_user.password may not be NULL
Note:
See TracTickets
for help on using tickets.
duplicate of #19133