Project

General

Profile

Bug #21775

Deleting tagged campaign fails

Added by Vladimir Podstavkov 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
01/25/2019
Due date:
% Done:

100%

Estimated time:
3.00 h
Spent time:
First Occurred:
Scope:
Internal
Experiment:
-
Stakeholders:
Duration:

Description

An internal error occurred, data has been logged. Please report the occurrance to POMS administrators.
Traceback (most recent call last):
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
context)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
cursor.execute(statement, parameters)
psycopg2.IntegrityError: update or delete on table "campaigns" violates foreign key constraint "fk_campaigns_tags_campaigns" on table "campaigns_tags"
DETAIL: Key (campaign_id)=(903) is still referenced from table "campaigns_tags".

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 630, in respond
self._do_respond(path_info)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 689, in do_respond
response.body = self.handler()
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/cherrypy/lib/encoding.py", line 221, in call
self.body = self.oldhandler(*args, **kwargs)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in call
return self.callable(*self.args, **self.kwargs)
File "/home/podstvkv/Workspace/Poms/poms/webservice/logit.py", line 18, in wrapper
return function(*args, **kwargs)
File "/home/podstvkv/Workspace/Poms/poms/webservice/poms_service.py", line 452, in show_campaigns
cherrypy.request.db, cherrypy.session, experimenter, *args, **kwargs)
File "/home/podstvkv/Workspace/Poms/poms/webservice/CampaignsPOMS.py", line 1432, in show_campaigns
synchronize_session=False)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3346, in delete
delete_op.exec
()
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1326, in exec_
self._do_exec()
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1518, in _do_exec
self._execute_stmt(delete_stmt)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1333, in _execute_stmt
mapper=self.mapper)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 1176, in execute
bind, close_with_result=True).execute(clause, params or {})
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 948, in execute
return meth(self, multiparams, params)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
context)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
exc_info
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 248, in reraise
raise value.with_traceback(tb)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
context)
File "/home/podstvkv/Venv/py36/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.IntegrityError) update or delete on table "campaigns" violates foreign key constraint "fk_campaigns_tags_campaigns" on table "campaigns_tags"
DETAIL: Key (campaign_id)=(903) is still referenced from table "campaigns_tags".
[SQL: 'DELETE FROM campaigns WHERE campaigns.campaign_id = %(campaign_id_1)s'] [parameters: {'campaign_id_1': '903'}] (Background on this error at: http://sqlalche.me/e/gkpj)

History

#1 Updated by Vladimir Podstavkov 7 months ago

  • Estimated time set to 3.00 h
  • % Done changed from 0 to 90
  • Status changed from New to Work in progress

#2 Updated by Vladimir Podstavkov 7 months ago

  • % Done changed from 90 to 100
  • Status changed from Work in progress to Resolved

#3 Updated by Stephen White 6 months ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF