Project

General

Profile

Actions

Anomalie #2945

closed

Crash on deleting OPE / DJANGO admin

Added by Yann Le Jeune about 9 years ago. Updated over 8 years ago.

Status:
Fermé
Priority:
Haut
Assignee:
Category:
-
Target version:
Start date:
16 November 2015
Due date:
% Done:

0%

Estimated time:
Élément(s):
Difficulté:

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

  1. response = callback(request, *callback_args, **callback_kwargs)

File "/usr/lib/python2.7/dist-packages/django/contrib/admin/options.py" in wrapper

  1. return self.admin_site.admin_view(view)(*args, **kwargs)

File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view

  1. response = view_func(request, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func

  1. response = view_func(request, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in inner

  1. return view(request, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper

  1. return bound_func(*args, **kwargs)

File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view

  1. response = view_func(request, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func

  1. return func(self, *args2, **kwargs2)

File "/usr/lib/python2.7/dist-packages/django/contrib/admin/options.py" in changelist_view

  1. 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

  1. response = func(self, request, queryset)

File "/usr/lib/python2.7/dist-packages/django/contrib/admin/actions.py" in delete_selected

  1. queryset.delete()

File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in delete

  1. collector.delete()

File "/usr/lib/python2.7/dist-packages/django/db/models/deletion.py" in decorated

  1. func(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/django/db/models/deletion.py" in delete

  1. sender=model, instance=obj, using=self.using

File "/usr/lib/python2.7/dist-packages/django/dispatch/dispatcher.py" in send

  1. response = receiver(signal=self, sender=sender, **named)

File "/usr/local/lib/python2.7/dist-packages/simple_history/models.py" in post_delete

  1. self.create_historical_record(instance, '-')

File "/srv/ishtar-NHI/ishtar/ishtar_common/models.py" in create_historical_record

  1. manager.create(history_type=type, **attrs)

File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py" in create

  1. return self.get_query_set().create(**kwargs)

File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in create

  1. obj.save(force_insert=True, using=self.db)

File "/usr/lib/python2.7/dist-packages/django/db/models/base.py" in save

  1. 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

  1. transaction.commit_unless_managed(using=using)

File "/usr/lib/python2.7/dist-packages/django/db/transaction.py" in commit_unless_managed

  1. connection.commit_unless_managed()

File "/usr/lib/python2.7/dist-packages/django/db/backends/init.py" in commit_unless_managed

  1. self._commit()

File "/usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py" in _commit

  1. 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 ».

Actions #1

Updated by Yann Le Jeune over 8 years ago

  • Status changed from Nouveau to En cours

To be checks with new versions

Actions #2

Updated by Yann Le Jeune over 8 years ago

  • Assignee changed from Étienne Loks to Yann Le Jeune
Actions #3

Updated by Yann Le Jeune over 8 years ago

  • Status changed from En cours to Fermé

Seems ok

Actions

Also available in: Atom PDF