Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error encountered while messing with a user account. IntegrityError: column user_id is not unique #18

Open
szaydel opened this issue Jul 30, 2013 · 0 comments

Comments

@szaydel
Copy link

szaydel commented Jul 30, 2013

Not at all sure what happened here, likely user error on my part, but I wanted to file this, just in case it may be something legitimate.

ERROR 2013-07-30 11:20:47,543 base 6683 140102808192768 Internal Server Error: /admin/auth/user/add/
Traceback (most recent call last):
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 366, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 196, in inner
    return view(request, *args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/views/decorators/debug.py", line 69, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in _wrapper
    return bound_func(*args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 21, in bound_func
    return func(self, *args2, **kwargs2)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/transaction.py", line 209, in inner
    return func(*args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/contrib/auth/admin.py", line 114, in add_view
    extra_context)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in _wrapper
    return bound_func(*args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 21, in bound_func
    return func(self, *args2, **kwargs2)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/transaction.py", line 209, in inner
    return func(*args, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 956, in add_view
    self.save_related(request, form, formsets, False)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 733, in save_related
    self.save_formset(request, form, formset, change=change)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 721, in save_formset
    formset.save()
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/forms/models.py", line 497, in save
    return self.save_existing_objects(commit) + self.save_new_objects(commit)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/forms/models.py", line 628, in save_new_objects
    self.new_objects.append(self.save_new(form, commit=commit))
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/forms/models.py", line 731, in save_new
    obj.save()
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 551, in save_base
    result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 203, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 1593, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 912, in execute_sql
    cursor.execute(sql, params)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
    return self.cursor.execute(sql, params)
  File "/home/locksmith/venv/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 344, in execute
    return Database.Cursor.execute(self, query, params)
IntegrityError: column user_id is not unique
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant