Anomalie #2945
ferméCrash on deleting OPE / DJANGO admin
0%
Description
IntegrityError at /admin/archaeological_operations/operation/
ERREUR: UPDATE ou DELETE sur la table « archaeological_operations_operation » viole la contrainte de clé étrangère
« operation_id_refs_id_6c936c556246a5a6 » de la table « archaeological_operations_administrativeact »
DETAIL: La clé (id)=(39564) est toujours référencée à partir de la table « archaeological_operations_administrativeact ».
Request Method: POST
Request URL: http://ishtar-nhi.paleosystem.fr/admin/archaeological_operations/operation/?q=&operation_type__id__exact=1
Django Version: 1.4.5
Exception Type: IntegrityError
Exception Value:
ERREUR: UPDATE ou DELETE sur la table « archaeological_operations_operation » viole la contrainte de clé étrangère
« operation_id_refs_id_6c936c556246a5a6 » de la table « archaeological_operations_administrativeact »
DETAIL: La clé (id)=(39564) est toujours référencée à partir de la table « archaeological_operations_administrativeact ».
Exception Location: /usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py in _commit, line 235
Environment:
Request Method: POST
Request URL: http://ishtar-nhi.paleosystem.fr/admin/archaeological_operations/operation/?q=&operation_type__id__exact=1
Django Version: 1.4.5
Python Version: 2.7.3
Installed Applications:
['django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.gis',
'django.contrib.staticfiles',
'django.contrib.formtools',
'south',
'registration',
'ishtar_common',
'archaeological_operations',
'archaeological_context_records',
'archaeological_warehouse',
'archaeological_finds']
Installed Middleware:
['django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware']
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/contrib/admin/options.py" in changelist_view
- response = self.response_action(request, queryset=cl.get_query_set(request))
File "/usr/lib/python2.7/dist-packages/django/contrib/admin/options.py" in response_action
- response = func(self, request, queryset)
File "/usr/lib/python2.7/dist-packages/django/contrib/admin/actions.py" in delete_selected
- queryset.delete()
File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in delete
- collector.delete()
File "/usr/lib/python2.7/dist-packages/django/db/models/deletion.py" in decorated
- func(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/db/models/deletion.py" in delete
- sender=model, instance=obj, using=self.using
File "/usr/lib/python2.7/dist-packages/django/dispatch/dispatcher.py" in send
- response = receiver(signal=self, sender=sender, **named)
File "/usr/local/lib/python2.7/dist-packages/simple_history/models.py" in post_delete
- self.create_historical_record(instance, '-')
File "/srv/ishtar-NHI/ishtar/ishtar_common/models.py" in create_historical_record
- manager.create(history_type=type, **attrs)
File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py" in create
- return self.get_query_set().create(**kwargs)
File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in create
- obj.save(force_insert=True, using=self.db)
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
- transaction.commit_unless_managed(using=using)
File "/usr/lib/python2.7/dist-packages/django/db/transaction.py" in commit_unless_managed
- connection.commit_unless_managed()
File "/usr/lib/python2.7/dist-packages/django/db/backends/init.py" in commit_unless_managed
- self._commit()
File "/usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py" in _commit
- return self.connection.commit()
Exception Type: IntegrityError at /admin/archaeological_operations/operation/
Exception Value: ERREUR: UPDATE ou DELETE sur la table « archaeological_operations_operation » viole la contrainte de clé étrangère
« operation_id_refs_id_6c936c556246a5a6 » de la table « archaeological_operations_administrativeact »
DETAIL: La clé (id)=(39564) est toujours référencée à partir de la table « archaeological_operations_administrativeact ».