Unable to add new users in bounceradmin if the irc nick is specified

REOPENED
Unassigned

Status

Webtools
Bouncer
REOPENED
8 years ago
5 years ago

People

(Reporter: justdave, Unassigned)

Tracking

Trunk
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

Trying to add a new sysadmin to the user list in bounceradmin so he can help out with mirror admin, and getting an ISE when I submit the new user form.

enabling DEBUG nets the following error detail:

Environment:

Request Method: POST
Request URL: https://bounceradmin.mozilla.com/admin/auth/user/add/
Django Version: 1.2
Python Version: 2.6.2
Installed Applications:
['api',
 'mirror',
 'geoip',
 'lib',
 'php',
 'users',
 'south',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.markup',
 'django.contrib.sessions']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.middleware.csrf.CsrfResponseMiddleware')


Traceback:
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  100.                     response = callback(request, *callback_args, **callback_kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/contrib/admin/options.py" in wrapper
  239.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view
  76.                     response = view_func(request, *args, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  69.         response = view_func(request, *args, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/contrib/admin/sites.py" in inner
  190.             return view(request, *args, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapper
  21.             return decorator(bound_func)(*args, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view
  76.                     response = view_func(request, *args, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/utils/decorators.py" in bound_func
  17.                 return func(self, *args2, **kwargs2)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/transaction.py" in _commit_on_success
  299.                     res = func(*args, **kw)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/contrib/auth/admin.py" in add_view
  104.         return super(UserAdmin, self).add_view(request, form_url, extra_context)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapper
  21.             return decorator(bound_func)(*args, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view
  76.                     response = view_func(request, *args, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/utils/decorators.py" in bound_func
  17.                 return func(self, *args2, **kwargs2)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/transaction.py" in _commit_on_success
  299.                     res = func(*args, **kw)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/contrib/admin/options.py" in add_view
  798.                     self.save_formset(request, form, formset, change=False)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/contrib/admin/options.py" in save_formset
  603.         formset.save()
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/forms/models.py" in save
  487.         return self.save_existing_objects(commit) + self.save_new_objects(commit)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/forms/models.py" in save_new_objects
  625.             self.new_objects.append(self.save_new(form, commit=commit))
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/forms/models.py" in save_new
  737.             obj.save()
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/models/base.py" in save
  435.         self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/models/base.py" in save_base
  528.                     result = manager._insert(values, return_id=update_pk, using=using)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/models/manager.py" in _insert
  195.         return insert_query(self.model, values, **kwargs)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/models/query.py" in insert_query
  1479.     return query.get_compiler(using=using).execute_sql(return_id)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
  783.         cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
  727.         cursor.execute(sql, params)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/backends/util.py" in execute
  15.             return self.cursor.execute(sql, params)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/django/db/backends/mysql/base.py" in execute
  86.             return self.cursor.execute(query, args)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/MySQLdb/cursors.py" in execute
  173.             self.errorhandler(self, exc, value)
File "/data/virtualenvs/tuxedo/lib/python2.6/site-packages/MySQLdb/connections.py" in defaulterrorhandler
  36.     raise errorclass, errorvalue

Exception Type: IntegrityError at /admin/auth/user/add/
Exception Value: (1062, "Duplicate entry '28' for key 2")
OS: Mac OS X → Linux
Hardware: x86 → x86_64
I just created a user testuser without problems (we're talking about the "Users" part of the admin, not "Legacy Users", correct?). The record received the number 29. (I then deleted that user again).

Please try again. If problems persist, please reopen with STR.
Assignee: nobody → fwenzel
Status: NEW → RESOLVED
Last Resolved: 8 years ago
OS: Linux → All
Hardware: x86_64 → All
Resolution: --- → WORKSFORME
ok, in attempting to figure out a reproducible test case, I discovered that the error occurs if you fill in an irc nick on the creation form.  If you leave the IRC nick blank, there is no error.
Status: RESOLVED → REOPENED
OS: All → Linux
Hardware: All → x86_64
Resolution: WORKSFORME → ---
Summary: Unable to add new users in bounceradmin → Unable to add new users in bounceradmin if the irc nick is specified
I can go back after creating the account and add the irc nick just fine.  It only errors if it's specified at creation time.
Thanks, that's very helpful.
Severity: critical → normal

Updated

5 years ago
Assignee: fwenzel → nobody
You need to log in before you can comment on or make changes to this bug.