Opened 3 years ago

Closed 3 years ago

#19144 closed Bug (duplicate)

"auth_user.password may not be NULL" IntegrityError when saving users in the admin

Reported by: zett.adam@… Owned by: nobody
Component: contrib.auth Version: master
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


I'm receiving an IntegrityError when trying to save users in the admin. I'm using sqlite3 database backend.

Steps to reproduce:

  1. Log in to admin.
  2. Go to Users and select a user to edit
  3. (Edit some fields,) and submit the form.

Below is a traceback:


Request Method: POST
Request URL:

Django Version: 1.5
Python Version: 2.7.3
Installed Applications:
Installed Middleware:

File "/data/python/django/django/core/handlers/" in get_response
  116.                         response = callback(request, *callback_args, **callback_kwargs)
File "/data/python/django/django/contrib/admin/" in wrapper
  367.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/data/python/django/django/utils/" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/data/python/django/django/views/decorators/" in _wrapped_view_func
  89.         response = view_func(request, *args, **kwargs)
File "/data/python/django/django/contrib/admin/" in inner
  202.             return view(request, *args, **kwargs)
File "/data/python/django/django/utils/" in _wrapper
  25.             return bound_func(*args, **kwargs)
File "/data/python/django/django/utils/" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/data/python/django/django/utils/" in bound_func
  21.                 return func(self, *args2, **kwargs2)
File "/data/python/django/django/db/" in inner
  208.                 return func(*args, **kwargs)
File "/data/python/django/django/contrib/admin/" in change_view
  1054.                 self.save_model(request, new_object, form, True)
File "/data/python/django/django/contrib/admin/" in save_model
File "/data/python/django/django/db/models/" in save
  532.                        force_update=force_update, update_fields=update_fields)
File "/data/python/django/django/db/models/" in save_base
  603.                             rows = manager.using(using).filter(pk=pk_val)._update(values)
File "/data/python/django/django/db/models/" in _update
  580.         return query.get_compiler(self.db).execute_sql(None)
File "/data/python/django/django/db/models/sql/" in execute_sql
  997.         cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/data/python/django/django/db/models/sql/" in execute_sql
  825.         cursor.execute(sql, params)
File "/data/python/django/django/db/backends/" in execute
  43.             return self.cursor.execute(sql, params)
File "/data/python/django/django/db/backends/sqlite3/" in execute
  360.             six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2])
File "/data/python/django/django/db/backends/sqlite3/" 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

Change History (1)

comment:1 Changed 3 years ago by ptone

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of #19133

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