Anomalie #3144
ferméDJANGO ADMIN : add OPE type crash
0%
Description
IntegrityError at /admin/ishtar_common/operationtype/add/
ERREUR: la valeur d'une clé dupliquée rompt la contrainte unique « ishtar_common_operationtype_pkey »
DETAIL: La clé « (id)=(1) » existe déjà.
Request Method: POST
Request URL: http://test.ishtar-archeo.net/admin/ishtar_common/operationtype/add/
Django Version: 1.4.5
Exception Type: IntegrityError
Exception Value:
ERREUR: la valeur d'une clé dupliquée rompt la contrainte unique « ishtar_common_operationtype_pkey »
DETAIL: La clé « (id)=(1) » existe déjà.
Exception Location: /usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py in execute, line 52
Python Executable: /usr/bin/uwsgi-core
Python Version: 2.7.3
Python Path:
['/srv/ishtarctest/ishtar/',
'.',
'',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/pymodules/python2.7']
Server time: ven, 8 Jul 2016 11:13:35 +0200
Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
- response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/django/contrib/admin/options.py" in wrapper
- return self.admin_site.admin_view(view)(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
- response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
- response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in inner
- return view(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
- return bound_func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
- response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
- return func(self, *args2, **kwargs2)
File "/usr/lib/python2.7/dist-packages/django/db/transaction.py" in inner
- return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/contrib/admin/options.py" in add_view
- self.save_model(request, new_object, form, False)
File "/usr/lib/python2.7/dist-packages/django/contrib/admin/options.py" in save_model
- obj.save()
File "/srv/ishtarctest/ishtar/ishtar_common/models.py" in save
- obj = super(GeneralType, self).save(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/db/models/base.py" in save
- self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/usr/lib/python2.7/dist-packages/django/db/models/base.py" in save_base
- result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py" in _insert
- return insert_query(self.model, objs, fields, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in insert_query
- return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in execute_sql
- cursor.execute(sql, params)
File "/usr/lib/python2.7/dist-packages/django/db/backends/util.py" in execute
- return self.cursor.execute(sql, params)
File "/usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py" in execute
- return self.cursor.execute(query, args)
Exception Type: IntegrityError at /admin/ishtar_common/operationtype/add/
Exception Value: ERREUR: la valeur d'une clé dupliquée rompt la contrainte unique « ishtar_common_operationtype_pkey »
DETAIL: La clé « (id)=(1) » existe déjà.
Mis à jour par Étienne Loks il y a plus de 8 ans
- Statut changé de Nouveau à Résolu
This error is specific to one instance. It doesn't occurs to new one. Probably a bad migration.
To fix it manualy (done on test.ishtar-archeo.net):