Closed Bug 769707 Opened 12 years ago Closed 11 years ago

[prod][traceback] IntegrityError: (1062, "Duplicate entry '1492-58' for key 'profile_skills_userprofile_id_1e41436682120c6d_uniq'")

Categories

(Participation Infrastructure :: Phonebook, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: mbrandt, Unassigned)

References

()

Details

(Whiteboard: [traceback][prod])

Traceback (most recent call last):

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/views/decorators/cache.py", line 88, in _wrapped_view_func
   response = view_func(request, *args, **kwargs)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/contrib/auth/decorators.py", line 19, in _wrapped_view
   return view_func(request, *args, **kwargs)

 File "/data/www/mozillians.org/mozillians/apps/phonebook/views.py", line 88, in edit_profile
   form.save(request)

 File "/data/www/mozillians.org/mozillians/apps/phonebook/forms.py", line 175, in save
   self.instance.set_membership(Skill, self.cleaned_data['skills'])

 File "/data/www/mozillians.org/mozillians/apps/users/models.py", line 130, in set_membership
   m2mfield.add(*groups_to_add)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/fields/related.py", line 502, in add
   self._add_items(self.source_field_name, self.target_field_name, *objs)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/fields/related.py", line 586, in _add_items
   '%s_id' % target_field_name: obj_id,

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/query.py", line 360, in create
   obj.save(force_insert=True, using=self.db)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/base.py", line 463, in save
   self.save_base(using=using, force_insert=force_insert, force_update=force_update)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/base.py", line 556, in save_base
   result = manager._insert(values, return_id=update_pk, using=using)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/manager.py", line 198, in _insert
   return insert_query(self.model, values, **kwargs)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/query.py", line 1456, in insert_query
   return query.get_compiler(using=using).execute_sql(return_id)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/sql/compiler.py", line 810, in execute_sql
   cursor = super(SQLInsertCompiler, self).execute_sql(None)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/models/sql/compiler.py", line 754, in execute_sql
   cursor.execute(sql, params)

 File "/data/www/mozillians.org/mozillians/vendor/src/django/django/db/backends/mysql/base.py", line 86, in execute
   return self.cursor.execute(query, args)

 File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
   self.errorhandler(self, exc, value)

 File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
   raise errorclass, errorvalue

IntegrityError: (1062, "Duplicate entry '1492-58' for key 'profile_skills_userprofile_id_1e41436682120c6d_uniq'")
Matt I can't reproduce this. And because we've changed the set_membership() code, which is referred in this traceback, I believe we can mark this as WFM. 

Please re-open if you receive another traceback or you face another problem saving your skills.

Thanks!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Thanks for looking into thi Giorgos - this does seem like an instance where the passage of time has surpassed this bug.

Verified WFM
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.